Raphaelをいじり始めていますが、解決できない問題があります。
テストの目的で、単純化されたシナリオを試しています。xとyに2つの入力フィールドを使用して、特定の場所に円を追加します。
円はほんの一瞬表示され、その後消えます。それはクロムとFFで起こります(他では試されていません)
私はこのhtmlを持っています
<div id="canvas_container"></div>
x<input id="cx" /><br/>
y<input id="cy" /><br/>
<button onclick="see(document.getElementById('cx').value,document.getElementById('cy').value)">Populate</button>
そしてこのjs
var paper;
window.onload = function () {paper = new Raphael(document.getElementById('canvas_container'), 1000, 1000);
}
function see(x, y) {
alert("coords " + x + " " + y);
var fino = paper.circle(x, y, 20).attr({
stroke: 'none',
fill: '#f60'
}).toFront();}
簡単でバカかもしれないと思いますが、見えません。よろしくお願いします!