简体   繁体   English

仅在dynamicjs中拖动底层

[英]Dragging bottom layer only in kineticjs

I am trying to find a way to drag and reposition an image that is below another (larger) image. 我正在尝试找到一种方法来拖动和重新放置另一个(较大)图像下方的图像。 So basically I want to make the top image completely ignored by the framework. 所以基本上我想使框架完全忽略顶部图像。 I have tried making it non-draggable, but it still covers up the bottom image and prevents me from resizing it. 我尝试过使其不可拖动,但它仍然掩盖了底部图像并阻止了我调整其大小。 Anyone had luck with this? 有人有运气吗?

If both images are in the same layer, then you can change the z-index and move the image to the front on click. 如果两个图像都在同一层中,则可以更改z索引,并在单击时将图像移到最前面。 ( .moveToTop()) (.moveToTop())

If not, then you have to change the z-index of the layer on click, so that the larger image does not cover the smaller. 如果不是,则必须更改单击时图层的z索引,以免较大的图像覆盖较小的图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM