IE issues

Hi there, just committed a very little fix (GitHub/Launchpad) that should make my software work on IE. Currently very busy with my project http://www.upcload.com – hear back from me soon. (Happy new year by the way!)

Philipp

About Johann Philipp

Computer science student.
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

13 Responses to IE issues

  1. Ravi says:

    Hi,

    I have used your javascript libraries before and I really like them. Recently, I downloaded your fix for IE from Launchpad. I still have a few issues in using it for IE. Could you please help me in getting past these errors.

    When I tried the index.html sample page, I got an error in dracula_graph.js at line 479.
    Expected identifier, string or number Line:479 Char:1

    I guess it was because of a comma at the end of line 478. I remove it and that went away. But now I get the following error:
    ‘layoutPosX’ is null or not an object Line: 388 Char:9

    Also, I see this error in Eclipse IDE (just the IDE – not listed like the previous ones on the javascript errors popup window in the IE browser)
    File: jquery-1.4.2.min.js
    Line: 65, Char:442
    Error: Syntax error, insert “)” to complete MethodInvocation

    Thanks,
    Ravi

    • Johann Philipp says:

      Wow. I am again impressed by IE :-) So, I do understand about the comma (although other JavaScript implementations are not that picky). But the thing about the ‘layoutPosX’ I cannot understand how this can happen. However, I do not have IE installed here right now to actually try and fix it, but will check it later! Thank you for the hint!

      Eclipse complaining about jQuery might be understandable, because I used the minified version which may not pass the Eclipse lexer, or whatever.

      Note that I plan to remove the jQuery dependence again anyway, because the contributor only used two functionalities of jQuery.

  2. Shawn says:

    Hi,

    I have tried your JavaScript library. It’s amazing and thanks for you providing this. And I plan to use it in my project. Currently, I meet two issues when using this lib.
    1. The ie issue you mentioned above. I got the error ‘layoutPosX’ is null or not an object(line 379)(dracula_graph.js)
    2. It seemed that there is a display issue when only one node exists. The node display at the left-top of the ‘canvas’
    I wonder if you have any plan to fix them recently.

    Again, I really like this library and thanks for your work

    Thanks,
    Shawn

  3. Shawn says:

    Hi,
    Just update my finding about that.
    I combined the explorercanvas with this project. And until now everything works well. The following is the link of explorercanvas
    http://code.google.com/p/explorercanvas/

  4. Piedone says:

    Hi,

    many, many thank for this cool library!
    I have the same problem under IE 8 as Shawn or Ravi with layoutPosX. Unfortunately the problem remains with explorercanvas. Shawn, you eliminated this error with explorercanvas? Could you please show an minimal piece of example what works for you? Because this:

    $(document).ready(function(){
    var g = new Graph();

    g.addEdge(‘ex1′, ‘ex2′);
    g.addEdge(‘ex2′, ‘ex3′);

    var layouter = new Graph.Layout.Spring(g);
    layouter.layout();

    var renderer = new Graph.Renderer.Raphael(‘canvas’, g, 600, 600);
    renderer.draw();
    });

    …is not working for me.

  5. Shawn says:

    I just include excanvas, nothing special


    From your code, it seemed the nodes were not added. Maybe you can try to add the node.

    g.addNode(‘ex1′);

    One thing missed, in ie, only one node in the graph will still throw the error.

  6. Piedone says:

    Hmm, thanks for your reply, I will try that. Although implicitly adding nodes is a documented feature.

  7. G says:

    Hi you….i still getting the layoutPosX issue….
    does anyone fixed it??
    i tried import the excanvas…but with no luck.
    Could someone please help me!
    TIA
    G.

  8. Brian Tingle says:

    Hi,

    If you are still getting problems after installing excanvas to your page; the problem I suspect is with with way IE deals with trailing commas is different and you end up with rouge undefined elements in arrays.

    With the following patch and excanvas I’m able to get this to work in IE

    — a/cpf2html/dracula_graph_js/dracula_graph.js Tue May 03 07:19:31 2011 -0400
    +++ b/cpf2html/dracula_graph_js/dracula_graph.js Wed Jun 01 15:20:15 2011 -0400
    @@ -376,6 +376,7 @@
    },

    layoutRepulsive: function(node1, node2) {
    + if (typeof node1 == ‘undefined’ || typeof node2 == ‘undefined’) return;
    var dx = node2.layoutPosX – node1.layoutPosX;
    var dy = node2.layoutPosY – node1.layoutPosY;
    var d2 = dx * dx + dy * dy;

  9. Brian Tingle says:

    trying for better formatting…


    --- a/cpf2html/dracula_graph_js/dracula_graph.js Tue May 03 07:19:31 2011 -0400
    +++ b/cpf2html/dracula_graph_js/dracula_graph.js Wed Jun 01 15:28:20 2011 -0400
    @@ -376,6 +376,7 @@
    },

    layoutRepulsive: function(node1, node2) {
    + if (typeof node1 == 'undefined' || typeof node2 == 'undefined') return;
    var dx = node2.layoutPosX - node1.layoutPosX;
    var dy = node2.layoutPosY - node1.layoutPosY;
    var d2 = dx * dx + dy * dy;

  10. G says:

    Hi,
    where did you apply that patch?

    TIA

    G.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht.

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">