If Jquery (last version) is loaded, the function Renderer is not able to draw inside a wanted element.
This is because jquery returns a wrapper to en element, not the dom element itself.
Test case:
var renderer = new Renderer('#paper', graph, 400, 400);
I have a div element with 'paper' id but the rendering doesn't happen inside it
The original code frangment is:
if (typeof element === "string") {
var selector = typeof $ !== "undefined" ? $ : function(q) {
return document.querySelector(q)
};
element = selector(element);
}
To solve my problem I modified into:
if (typeof element === "string") {
element = (typeof $ !== "undefined")? $(element)[0]: document.querySelector(element);
}
If Jquery (last version) is loaded, the function Renderer is not able to draw inside a wanted element. This is because jquery returns a wrapper to en element, not the dom element itself.
Test case: var renderer = new Renderer('#paper', graph, 400, 400); I have a div element with 'paper' id but the rendering doesn't happen inside it
The original code frangment is: if (typeof element === "string") {
To solve my problem I modified into:
Regards Andrea