fixed $hcanv leak

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2403 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Bruno Heridet 2013-02-15 23:17:56 +00:00
parent 7a36f90eb6
commit a851e70c6e
1 changed files with 3 additions and 6 deletions

View File

@ -1388,7 +1388,6 @@
// This function also updates the opacity and id elements that are in the context panel // This function also updates the opacity and id elements that are in the context panel
var updateToolbar = function() { var updateToolbar = function() {
if (selectedElement != null) { if (selectedElement != null) {
switch (selectedElement.tagName) { switch (selectedElement.tagName) {
case 'use': case 'use':
case 'image': case 'image':
@ -1398,7 +1397,6 @@
case 'a': case 'a':
// Look for common styles // Look for common styles
var gWidth = null; var gWidth = null;
var childs = selectedElement.getElementsByTagName('*'); var childs = selectedElement.getElementsByTagName('*');
for (var i = 0, len = childs.length; i < len; i++) { for (var i = 0, len = childs.length; i < len; i++) {
var swidth = childs[i].getAttribute('stroke-width'); var swidth = childs[i].getAttribute('stroke-width');
@ -1433,7 +1431,6 @@
if ($('#linecap_' + attr).length != 0) if ($('#linecap_' + attr).length != 0)
setStrokeOpt($('#linecap_' + attr)[0]); setStrokeOpt($('#linecap_' + attr)[0]);
} }
} }
// All elements including image and group have opacity // All elements including image and group have opacity
@ -4543,7 +4540,7 @@
var $hcanv_orig = $('#ruler_' + dim + ' canvas:first'); var $hcanv_orig = $('#ruler_' + dim + ' canvas:first');
// Bit of a hack to fully clear the canvas in Safari & IE9 // Bit of a hack to fully clear the canvas in Safari & IE9
$hcanv = $hcanv_orig.clone(); var $hcanv = $hcanv_orig.clone();
$hcanv_orig.replaceWith($hcanv); $hcanv_orig.replaceWith($hcanv);
var hcanv = $hcanv[0]; var hcanv = $hcanv[0];