rebootcode / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

Patch for svgcanvas.js: Fix MouseUp event not being delegated to extensions. #860

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new extension
2. add MouseUp Listener that, e.g., raises an alert once triggered
3. start svg editor with extension enabled. -> MouseUp will never be triggered

What is the expected output? What do you see instead?
MouseUp will be triggered

In what browser did you experience this problem? (ALL, Firefox, Opera, etc) all 
browsers

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc) latest trunk

Please provide any additional information below.
The attached patch fixes the problem. Basically the mouseUp handler in 
svgcanvas contains a "return;" statement that prevents the extension call back 
being triggered

Original issue reported on code.google.com by carsten.block@gmail.com on 27 Sep 2011 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago
Why is it ok for the "select" case to return early but the "zoom" case cannot?  
Does your extension have something specific to do with the "zoom" tool?

Also, are you sure this fix has no other adverse effects?  It means control 
gets to the if (!keep && element != null) {...} section of the code.  Please 
let me know you've tested scenarios like being inside a group, and any other 
scenarios you can think of.

More details into your extension would make me feel more confident.

Original comment by codedr...@gmail.com on 1 Oct 2011 at 12:42