daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
9.95k stars 616 forks source link

Unable to set style of moveable control box #339

Open geoffbullen opened 3 years ago

geoffbullen commented 3 years ago

Environments

Angular

Description

I am trying to set the style of the moveable line, but setting the style to important doesn't seem to have an effect on this particular attribute

.moveable-line { background: red !important; }

Also when I scroll the infinite viewer, the position of the control box doesn't change along with its target.

image

Demo of problem

Here is a codesandbox https://codesandbox.io/s/laughing-nash-l3t5o

daybrush commented 3 years ago

@geoffbullen

Set style global.

and also use container option.

  <div class="viewport" #viewport>
    <ngx-moveable
      #moveable
      [container]="viewport" />
....
geoffbullen commented 3 years ago

Thanks very much @daybrush

vuhoangnamkstn97 commented 2 years ago

can you post the code after edited