Skip to content
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

Remove object shape tool #16

Closed
celeitner opened this issue May 4, 2017 · 7 comments
Closed

Remove object shape tool #16

celeitner opened this issue May 4, 2017 · 7 comments
Assignees
Labels

Comments

@celeitner
Copy link

Shape tool is no longer available after removing the last shape.

  1. click shape
  2. create square
  3. select square
  4. click remove selected object
  5. no longer can you create a shape

This also happens if I select the shape object and select delete on the keyboard. ( I suspect they both take the same code path - to removeActiveObject() )
I'm not sure where to look to debug this?

@dongsik-yoo
Copy link
Contributor

The removeActiveObject()invokes endDrawingShapeMode(), therefore you should use startDrawingShapeMode() again after removeActiveObject() if you want to stay drawing shape mode.

Thanks a lot.

@dongsik-yoo dongsik-yoo self-assigned this May 8, 2017
@celeitner
Copy link
Author

That is what I am doing but it does not work. If you have only one shape and remove it then the startDrawingShapeMode() does not work anymore. You can see this in your demo.

click shape
create a square
select the square
click remove active object
no longer can you create a shape

@dongsik-yoo
Copy link
Contributor

I could reproduce what you said. OK I can handle that problem in demo page.

@dongsik-yoo
Copy link
Contributor

This problem was solved. The patch will be included in the next version.

@celeitner
Copy link
Author

Can you share the details of the fix? When is the next version going to be released?

@dongsik-yoo
Copy link
Contributor

dongsik-yoo commented May 11, 2017

Below code this.deactivateAll(); line will be removed in the next release version.

[imageEditor.js]

   /**
     * End current action & Deactivate
     * @example
     * imageEditor.startFreeDrawing();
     * imageEidtor.endAll(); // === imageEidtor.endFreeDrawing();
     *
     * imageEditor.startCropping();
     * imageEditor.endAll(); // === imageEidtor.endCropping();
     */
    endAll() {
        this.endTextMode();
        this.endFreeDrawing();
        this.endLineDrawing();
        this.endCropping();
        this.endDrawingShapeMode();
        this.deactivateAll();
        this._state = states.NORMAL;
    }

And we are planning to release the next version at the end of this month.

@dongsik-yoo
Copy link
Contributor

This issue has been solved at v2.0.0.
Please check this out at demo page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants