Gisellameloni / svg-edit

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

2.6 does not work with QtWebKit #1103

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Launch QtWebKit-based browser (eg http://qtweb.net or the "Fancy Browser" 
demo from Qt examples that comes with Qt SDK(4.8.4, 5.1).
2. Access the url provided in the project home page 
(http://svg-edit.googlecode.com/svn/branches/2.6/editor/svg-editor.html)

What is the expected output? What do you see instead?
Thera are no icons on the controls. Controls are not working

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

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc)
2.6, Latest trunk. 
2.5.1 seems to be ok

Please provide any additional information below.
I tried Windows 7, 64bit

Original issue reported on code.google.com by dezdecha...@tut.by on 10 Jun 2013 at 2:47

Attachments:

GoogleCodeExporter commented 9 years ago
Hello

I sometimes happen to have this problem in Chrome (curiously not always), in a 
web application of mine I built upon svg-edit 2.6.
Do you have any output in the console when the page loads ?
I have a "Uncaught Error: NotFoundError: DOM Exception 8 " error in jquery 
1.7.2, and an "Uncaught TypeError: Type error" afterwards in svgcanvas.js :

this.embedImage = function(val, callback) {

    // load in the image and once it's loaded, get the dimensions
    $(new Image()).load(function() {
        // create a canvas the same size as the raster image
        var canvas = document.createElement("canvas");
        canvas.width = this.width;
        canvas.height = this.height;
        // load the raster image into the canvas
        canvas.getContext("2d").drawImage(this,0,0);
Uncaught TypeError: Type error
        // retrieve the data: URL
        try {
            var urldata = ';svgedit_url=' + encodeURIComponent(val);
            urldata = canvas.toDataURL().replace(';base64',urldata+';base64');
            encodableImages[val] = urldata;
        } catch(e) {
            encodableImages[val] = false;
        }
        last_good_img_url = val;
        if(callback) callback(encodableImages[val]);
    }).attr('src',val);
}

Original comment by inmagnav...@gmail.com on 11 Jun 2013 at 9:03

GoogleCodeExporter commented 9 years ago
Hello! Thanks for reply.
Unfortunately, it seems there is no so cool debug tool in QtWebKit as Chrome 
have. All that I have is <"TypeError: 'null' is not an object"> ( the source of 
the message is undefined ).
I'm going to look deeper later.

Original comment by dezdecha...@tut.by on 12 Jun 2013 at 8:29

GoogleCodeExporter commented 9 years ago
Sorry, I was wrong. QtWebKit has Web Inspector. Svg Edit use 
window.localStorage to share some data beetwen sessions, but localStorage is 
not present in QtWebKit. Everything else seems to work fine. Thanks!

Original comment by dezdecha...@tut.by on 12 Jun 2013 at 10:32

GoogleCodeExporter commented 9 years ago
OK, so you think your issue is local storage related ?

Original comment by inmagnav...@gmail.com on 21 Jun 2013 at 8:10

GoogleCodeExporter commented 9 years ago
Yes, it is

Original comment by dezdecha...@tut.by on 10 Jul 2013 at 12:37

GoogleCodeExporter commented 9 years ago
Sounds like we can close this then? Especially since 2.7 removed a requirement 
for using localStorage?

Original comment by bret...@gmail.com on 8 Apr 2014 at 2:23