Skip to content

Kinetic JS dragging a layer causes shapes on another layer to stop responding to drag (kinetic-v4.4.3.min.js) #404

Closed

Description

@EveryoneMustWin

There is a problem in 4.4.3 where dragging a layer can interfere with shapes on another layer. The problem seems to be when setAttrs() is called on the other layer with {x:this.getX(), y:this.getY()} to try and keep the layers aligned.

Shapes on that layer which were draggable lose the ability to be dragged. It seems that creating a new draggable shape after that restores the desired behaviour.

This issue was not present in 4.3.3

Perhaps I'm not using it right?

http://jsfiddle.net/EveryoneMustWin/QRaxJ/

Thanks,
Oscar

Activity

  1. plrdev commented on Apr 24, 2013

    @plrdev

    I think I have a similar problem. I noticed that dragging a layer sometimes cleared hit canvas for other shape not related at all. I made a hack to draw that hit canvas when dragging ends, but it would be nice to get a proper fix for this. This was introduced in 4.4.0, it's not reproducable with 4.3.3

  2. robokozo commented on May 29, 2013

    @robokozo

    @eduplus Thanks for mentioning which version it wasn't reproducible in.

    I've experienced something similar in 4.5.2 so I had to revert to 4.3.3 in the mean time.

  3. ericdrowell commented on May 29, 2013

    @ericdrowell
    Owner

    will look at this as soon as I get the chance, thanks for posting :)

  4. pamba commented on Jul 17, 2013

    @pamba

    I am using 4.3.3 due this issue as well and would love use the latest version. :(

  5. markcallen commented on Aug 26, 2013

    @markcallen

    Having the same problem with large number of layers in 4.6.0, have reverted to 4.3.3 as well.

  6. ericdrowell commented on Aug 26, 2013

    @ericdrowell
    Owner

    I've promoted this ticket in priority. I'll try to get this fixed for v4.6.1

  7. ericdrowell commented on Sep 14, 2013

    @ericdrowell
    Owner

    @edplus you are correct, I demonstrated the hit canvas issue by forking the jsfiddle here:

    http://jsfiddle.net/37pG3/

  8. ericdrowell commented on Sep 14, 2013

    @ericdrowell
    Owner

    another update on this thread: I'm actually in the process of putting together the 4.7.0 release. This bug is still present. It will be fixed along with some other hit graph enhancements in v4.7.1.

  9. plrdev commented on Nov 28, 2013

    @plrdev

    We are still having this happen on v.4.7.4 - any updates on this?

  10. lavrton commented on Mar 3, 2014

    @lavrton
    Contributor

    Hit canvas is not updating while dragging (for performance reasons).
    As a workaround you may draw layer on dragend.

    kItems.lowerLayer.on("dragend", function() {
        kItems.upperLayer.draw();  // or just drawHit()
    });

    Updated demo: http://jsfiddle.net/lavrton/37pG3/1/

  11. lavrton commented on Jan 22, 2015

    @lavrton
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions