Git Product home page Git Product logo

Comments (15)

giovanni-bertoncelli avatar giovanni-bertoncelli commented on June 9, 2024 1

Hello guys, I've lately upgraded to latest Konva version (9.3.6) and I get this error:

ERROR TypeError: Cannot read properties of undefined (reading 'isDragging')
    at Object.isDragging (Global.js:46:36)
    at Stage._pointerleave (Stage.js:349:46)
    at content.addEventListener.passive (Stage.js:308:33)
    at _ZoneDelegate.invokeTask (zone.umd.js:445:35)
    at core.mjs:10757:55
    at AsyncStackTaggingZoneSpec.onInvokeTask (core.mjs:10757:36)
    at _ZoneDelegate.invokeTask (zone.umd.js:444:64)
    at Object.onInvokeTask (core.mjs:11070:33)
    at _ZoneDelegate.invokeTask (zone.umd.js:444:64)
    at Zone.runTask (zone.umd.js:210:51)

Maybe it's related to this issue?

from konva.

lavrton avatar lavrton commented on June 9, 2024 1

@giovanni-bertoncelli at least once somewhere in your code you need to import core of the library

import Konva from 'konva/lib/Core';

from konva.

bliepp avatar bliepp commented on June 9, 2024

Not sure if it's the same problem, but I have a similar problem: Basic example project can be found in #1727. With Konva 9.3.5 you loose all control over the object after the transformer was used once to rotate or resize the object. I believe this is a bug introduced by the latest performance improvements. However, I'm not sure about this as I'm no JS expert and it could have been introduced by the recent changes in the event order as well.

A demo can be found at https://bliepp.uber.space/demo/konva_lag/9.3.5/

from konva.

lavrton avatar lavrton commented on June 9, 2024

@bliepp oh, that is a bad bug. Thanks for the report.

@karl20888 can you make a demo of your issue?

from konva.

lavrton avatar lavrton commented on June 9, 2024

@bliepp fixed in the last version 9.3.6. Please confirm.

from konva.

karl20888 avatar karl20888 commented on June 9, 2024

@lavrton same as bliepp's
Thank you so much for fixing this bug! I have confirmed that version 9.3.6 addresses the issue. Your contribution is greatly appreciated!

from konva.

bliepp avatar bliepp commented on June 9, 2024

@lavrton Thanks, I appreciate your commitment to fast paced bug fixes. I can confirm the bug's now gone with 9.3.6.

from konva.

bliepp avatar bliepp commented on June 9, 2024

@giovanni-bertoncelli It might be related, but my demo does not throw that error. Does this error show up with any of the other latest realeases (ie. 9.3.5 or 9.3.4)?

from konva.

giovanni-bertoncelli avatar giovanni-bertoncelli commented on June 9, 2024

I'll check that out... have you tried with pointerleave listener?

from konva.

bliepp avatar bliepp commented on June 9, 2024

No, I have not. My test project can be found in the discussion thread mentioned above. It's basically a minimal HTML file with a single layer with a single rectangle and a transformer attached to it. That's it.

from konva.

giovanni-bertoncelli avatar giovanni-bertoncelli commented on June 9, 2024

Ok, if you can put your project on something like StackBlitz or CodeSandBox I can try to reproduce my issue

from konva.

bliepp avatar bliepp commented on June 9, 2024

Ok, if you can put your project on something like StackBlitz or CodeSandBox I can try to reproduce my issue

Just have a look at #1727. You can find my code there.

from konva.

lavrton avatar lavrton commented on June 9, 2024

@giovanni-bertoncelli about this issue "Cannot read properties of undefined (reading 'isDragging')". Do you use some kind of minimal bundle of konva library? How do you import it?

from konva.

giovanni-bertoncelli avatar giovanni-bertoncelli commented on June 9, 2024

HI @lavrton , I'm the maintainer of ngx-konva. As you can see here: https://github.com/ctinnovation/ngx-konva/blob/main/projects/ngx-konva/package.json and here https://github.com/ctinnovation/ngx-konva/blob/main/projects/ngx-konva/src/lib/components/ko-shape.component.ts I'm using Konva with NPM as ESModule.

from konva.

giovanni-bertoncelli avatar giovanni-bertoncelli commented on June 9, 2024

@lavrton Oh ok, I didn't know that... I'll give it a try, thank you!

from konva.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.