Pixastic和我的畫布偵聽器之間有一個奇怪的衝突。使用Pixastic插件後Canvas偵聽器不工作
當我在畫布上使用Pixastic函數時,此操作後畫布的偵聽器不起作用。我使用Pixastic插件分析了我的畫布,並發現pixastic添加了一些屬性,如tabindex(我認爲與聽衆衝突)。
這是我的畫布前,後:
//Before
<canvas id="mycanvas" width="727" height="600" style="border: 1px solid black; left: 36.5px; top: 21px;"></canvas>
//After
<canvas id="mycanvas" class="" width="600" height="727" style="border: 1px solid black; left: 36.5px; top: 21px;" title="" tabindex="-1"></canvas>
我用的聽衆mousedown
,mouseup
,mousemove
。有人可以幫助我嗎?
在某些情況下,Pixastic將替換畫布以顯示其結果。你確定它仍然是你的畫布嗎?我會嘗試通過直接在html代碼中添加一個像test =「imhere」這樣的多餘屬性。 – noiv