-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically adding objects to Konva stage #9
Comments
Hi!, I've been trying unsucessfully to implement this aswell, add new shapes dinamically to a stage. |
I tried this with queryList updates a while ago (when I was totally new to angular 4). I dont use ng2-konva right now, I have an own implementation which uses injectors alot, which uses the fact that each parent component can be injected to childs. The child then can operate on the parent. I will think about whether to continue with my implementation or ng2-konva in the next days. In case Ill go with ng2-konva, you might find the desired feature soon :-) |
Had the same issue, gave up and now I'm recreating the whole scene at every change, using *ngIf and ChangeDetectorRef |
Are there any updates on this? I am facing the same issue adding shapes in click event. |
Is there any update yet, I also have the same requirement of adding stage, layers, groups and shapes dynamically ? |
In the latest version the above example seems to work fine. Just change the 'rxjs/Observable' -> 'rxjs' and add 'of' as import (of rxjs). Code: @component({ public width = 800; public configStage = Observable.of({ public addStarBtn() { protected addStar() { public ngOnInit() { |
The mentioned example does not add star on button click. |
Any updates ? The issue still continues . |
guys maybe you just need to add stage.batchDraw() after u add the figure dinamically in order to update the layer, this worked for me |
Any updates ? The issue still there . Kindly share demo @ stackblitz |
Any breakthrough? |
Any updates here ? |
I'm trying to add objects to my Konva stage by clicking on buttons.
I adjusted the star example but I can't get it to work. Is there a way to do that? :)
https://gist.github.com/saitho/a244927f4dc9ea73b50eb8f86a833047
The text was updated successfully, but these errors were encountered: