rebootcode / svg-edit

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

Chrome chopping off bottom of some imported images #773

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Import Flora > Macroalgae > Colpomenia
2.
3.

What is the expected output? What do you see instead?
Symbol as it should be, but the bottom is clipped off.

Please use labels and text to provide additional information.
Note that if you open via:
http://ian.umces.edu/diagrammer/editor/svg-editor.html?url=/imagelibrary/albums/
userpics/12789/iil-symbol-colpomenia-sp.svg

it looks fine and interestingly, another import of the same symbol via the 
image library on top of this, then also looks fine.

I should probably help you out by breaking this symbol down to see where the 
problem is, but just found something else I need to report - maybe try to look 
into it later :)

Original issue reported on code.google.com by adrianbj...@gmail.com on 3 Feb 2011 at 5:36

GoogleCodeExporter commented 9 years ago
Just noticed that the same problem occurs with many of the images in the maps 
library. Try out Ecosystems > Maps > USA AL FL: Perdido Bay as an example.

Original comment by adrianbj...@gmail.com on 9 Feb 2011 at 10:09

GoogleCodeExporter commented 9 years ago

Original comment by adrianbj...@gmail.com on 9 Feb 2011 at 10:10

GoogleCodeExporter commented 9 years ago
Another quick update - breaking link to reference element reveals the entire 
image

Original comment by adrianbj...@gmail.com on 10 Feb 2011 at 6:44

GoogleCodeExporter commented 9 years ago
Sorry for the barrage, but just also noticed that if you try to drag one of 
these symbols which are cut off, the bounding box gets further and further from 
where it should be with each drag. Maybe a clue as to what is going on?

Original comment by adrianbj...@gmail.com on 10 Feb 2011 at 7:08

GoogleCodeExporter commented 9 years ago

Original comment by adrianbj...@gmail.com on 23 Sep 2011 at 4:45

GoogleCodeExporter commented 9 years ago
Moving all open import issues to 2.7 milestone.

Original comment by asyazwan on 26 Mar 2012 at 7:32

GoogleCodeExporter commented 9 years ago
This is actually a webkit issue - affects Chrome and desktop and mobile 
versions of Safari

Original comment by adrianbj...@gmail.com on 12 Sep 2012 at 1:07

GoogleCodeExporter commented 9 years ago
I have a workaround for this - these changes to svgcanvas.js fix the problem. 
The problem first showed up in r1774.

            if(svgedit.browser.isGecko()) {
                var symbol = svgdoc.createElementNS(svgns, "symbol");
            }
            var defs = findDefs();

            //if(svgedit.browser.isGecko()) {
                // Move all gradients into root for Firefox, workaround for this bug:
                // https://bugzilla.mozilla.org/show_bug.cgi?id=353575
                // TODO: Make this properly undo-able.
                $(svg).find('linearGradient, radialGradient, pattern').appendTo(defs);
            //}

            if(svgedit.browser.isGecko()) {
                while (svg.firstChild) {
                    var first = svg.firstChild;
                    symbol.appendChild(first);
                }
                var attrs = svg.attributes;
                for(var i=0; i < attrs.length; i++) {
                    var attr = attrs[i];
                    symbol.setAttribute(attr.nodeName, attr.nodeValue);
                }
            }

        if(!svgedit.browser.isGecko()) {
                var symbol = svg;
            }

Original comment by adrianbj...@gmail.com on 13 Sep 2012 at 5:27

GoogleCodeExporter commented 9 years ago
Just tested this fix again on the 2.6 branch and it is still needed and it 
still works

Original comment by adrianbj...@gmail.com on 8 Mar 2013 at 4:19

GoogleCodeExporter commented 9 years ago

Original comment by bret...@gmail.com on 7 Apr 2014 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by bret...@gmail.com on 7 Apr 2014 at 3:44