Comments (15)
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.
@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.
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.
@bliepp oh, that is a bad bug. Thanks for the report.
@karl20888 can you make a demo of your issue?
from konva.
@bliepp fixed in the last version 9.3.6. Please confirm.
from konva.
@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.
@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.
@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.
I'll check that out... have you tried with pointerleave listener?
from konva.
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.
Ok, if you can put your project on something like StackBlitz or CodeSandBox I can try to reproduce my issue
from konva.
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.
@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.
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.
@lavrton Oh ok, I didn't know that... I'll give it a try, thank you!
from konva.
Related Issues (20)
- Konva React Text - Cannot use SVG for text pattern HOT 1
- Different scaling behavior on SVGs in different browsers HOT 1
- path fill miss somre area HOT 2
- Mouseup triggered the click event for the image, and I hope he doesn't trigger it,It's not as simple as imagined HOT 1
- `pointerclick` is fired on drag enq but `click` is not HOT 3
- Request: add package-lock.json file (`npm run build` broken) HOT 2
- Position of group not not consistent between stages after drag HOT 1
- shape.getClientRect() is not updated after layer.cache() HOT 2
- Strange behavior when fillingPatternImage and clone update HOT 2
- Terminal Error: Command failed with exit code 3221225477. HOT 2
- Cannot read 'isDragging' even though importing (unused) Core HOT 4
- HTML canvas disappears in Chrome after browser window/tab becomes inactive HOT 7
- The Konva Transformer is unable to change the width and height of the rect HOT 1
- Konvajs Path getPointAtLength Incorrect Compute HOT 2
- Transformer blocks konva after using multitouch
- Crash when toggling layers in Vue3
- Demo not working on konvajs.org homepage HOT 1
- flipEnabled =false in transformer not working??? HOT 1
- [email protected] + Animation,The page crashes after running for a while
- bug: Text stroke is buggy in android webview
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from konva.