Hi all,
I'm trying to write something to simplify experimentation with SVG path, but i have a problem where it doesn't actually update the screen when i can verify that the svg code is updated. Basically the work flow is as follows: I type something into the input box (A path string), and click draw, it will clear the canvas, then draw the shape according to the typed path string.
After some more testing, i realized that it seem to be a bug in beta chrome. As the following code seem to work fine in firefox. If anyone have any insights, it would be much appreciated!
Javascript:
$(function(){
var paper = Raphael($('#paper')[0], 500, 500);
$('#path').change(function(){
console.log($(this).val());
var rect = paper.rect(10, 10, 50, 50);
console.log(rect);
var path = paper.path($(this).val());
});
});
HTML:
<div id="content">
<div id="paper"></div>
<div id="pathDiv">
<input id="path" type="text" name="path" />
</div>
</div>
If anyone have any suggestions, it would be much appreciated!
Jason