rebootcode / svg-edit

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

Update to latest jQuery #891

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Latest jQuery is now 1.7, svg-edit is using 1.4.

I can see problems since SE is using old jquery plugins like svgicons that will 
break with newer jQuery. But I think the upgrade will be worth it with all the 
improved performance and features like $.parseXML.

I'm willing to help with some pointers.

Original issue reported on code.google.com by asyazwan on 22 Dec 2011 at 6:35

GoogleCodeExporter commented 9 years ago
I've updated mine to jquery-1.7.1. I found two things that I fixed (see patch). 
I ran the tests in the test directory and they passed. Obviously, there's a lot 
more that needs to be tested. I've only tested with Chrome running svg-edit on 
the local file system. I will be testing with a web server soon.

Windows 7 SP1
Chrome 16.0.912.75

Original comment by FlintOBr...@gmail.com on 20 Jan 2012 at 4:23

Attachments:

GoogleCodeExporter commented 9 years ago
I also used the lastest jquery-UI, 1.8.17. I generated it with the components 
in svg-edit's current jquery-ui (attached):
- UI Widget
- UI Mouse
- UI Draggable
- UI Slider

Original comment by FlintOBr...@gmail.com on 20 Jan 2012 at 5:19

Attachments:

GoogleCodeExporter commented 9 years ago
Hey the patch seems simpler than I imagined. I'll try them myself next week 
once I'm back to work and post my findings. Hope it will be officially applied 
if everything is ok!

Thanks!

Original comment by asyazwan on 20 Jan 2012 at 11:59

GoogleCodeExporter commented 9 years ago
Your patch works. Finally got rid of event.layerX & layerY warnings in Chrome.

Thanks.

Original comment by asyazwan on 20 Feb 2012 at 8:07

GoogleCodeExporter commented 9 years ago
Hey folks - I grabbed the 1.7.1 minified version of jquery, patched Flint's 
changes and the custom jquery-ui attachments he has here and couldn't see any 
obvious bugs.  If I commit these changes to the trunk, do I have your 
commitment that you'll work to resolve any bugs that may come up? :)

Original comment by codedr...@gmail.com on 22 Feb 2012 at 6:04

GoogleCodeExporter commented 9 years ago
Sure. I'm actively using SE so any eventual bugs due to 1.7.1 will need to be 
dealt with anyway.

In chrome every event.layerX & Y warnings will increase the memory by 2K bytes. 
Anytime you mouse over the canvas, in moments you'll get few hundreds of those 
warnings -- easily. That's already megabytes of memory increase (monitor in 
Chrome's task manager with Shift + Esc). So in long-running SE session it's 
becoming increasingly alarming how much memory SE tab is using (I know memory 
is not an issue to most, but still if we can save, why not). That alone is 
reason enough to apply this patch.

From: http://blog.jquery.com/2011/11/03/jquery-1-7-released/
    event.layerX and event.layerY: We have removed these non-standard properties in version 1.7. Although we normally would have gone through a deprecation notice period for these, Chrome version 16 generates a flood of console warning messages on the page. Because of this, we decided to remove them immediately. On platforms that still support these properties, they are available through event.originalEvent.layerX and event.originalEvent.layerY.

Original comment by asyazwan on 23 Feb 2012 at 1:32

GoogleCodeExporter commented 9 years ago
Ok, commited r2052 and closing this bug.  asyazwan - you're on the hook! :)

I've seen those layerX and Y warnings forever but never knew what they were 
about.  Cool to know it's been fixed.

Original comment by codedr...@gmail.com on 23 Feb 2012 at 2:50