paperjs: moveAbove don't working

57 Views Asked by At

I have 2 Path, i use item1 move above item2

item1.moveAbove(item2)

it has changed the value of the index path but does not display correctly on the screen.

Item1: enter image description here Item2: enter image description here

But on screen item1 still below item2.

How to fix this?

1

There are 1 best solutions below

0
On

Could you provide a simple test-case, perhaps on http://sketch.paperjs.org/ ?

Are you using JavaScript directly and modifying the scene graph from a native JS event? In that case, you need to update the view manually:

paper.view.update();