moveable icon indicating copy to clipboard operation
moveable copied to clipboard

Built-in way to completely hide the controlbox

Open szilardszaloki opened this issue 4 years ago • 6 comments

Hi there, Is there a built-in way (e.g. a switch) to completely hide the controlbox?

szilardszaloki avatar May 30 '20 20:05 szilardszaloki

@szilardszaloki

Use css (display: none) or moveable.target = null.

daybrush avatar May 31 '20 07:05 daybrush

I came here to ask what may be the same question.

When I try the display: none; it gets rid of the content inside the moveable, and leaves moveable's blue rectangle around the content. What I want to do is get rid of the blue rectangle drawn around the moveable... my example is not resizable, and I have a dragTarget drawn. In my case, the thing is not rectangular, so the blue rectangle drawn by moveable is pretty distracting.

Thanks!

csterritt avatar Jun 05 '20 14:06 csterritt

@csterritt

Try this code:

.moveable-line.moveable-direction {
display: none;
}

daybrush avatar Jun 05 '20 14:06 daybrush

@daybrush Thanks! I had to change the CSS to fix the specificity, but it works now. Much appreciated!

.moveable-line. > moveable-direction {
  display: none;
}

csterritt avatar Jun 05 '20 16:06 csterritt

https://github.com/daybrush/moveable/blob/master/handbook/handbook.md#set-classname

this.moveable.className = 'hide-border'

.hide-border { display: none !important; }

zhishaofei3 avatar Oct 22 '20 07:10 zhishaofei3

have you guys noticed that hiding the controls makes functions not work - no cursor to resize, scaling

lamhungypl avatar Jan 17 '24 10:01 lamhungypl