Closed LinCaster closed 6 years ago
can you reproduce the problem with the sandbox https://projects.calebevans.me/jcanvas/sandbox/ ?
@nallias @caleb531 I want to be at without changing the rendering order. Black covered in red
I believe you need to use layers to do this (add layer=true), and the index is not an arbitrary value, it is the index into the layers array. Had to use drawLayers to get it to take affect. Also see moveLayers
$('canvas').drawArc({ fillStyle: '#000', x: 100, y: 100, radius: 50, layer: true, });
var abc = $('canvas').drawArc({ fillStyle: '#f00', x: 150, y: 150, radius: 50, layer: true, index: 0 // index 0 is the bottommost layer }) $('canvas').drawLayers();
From: LinCaster Sent: Thursday, October 11, 2018 7:59 AM To: caleb531/jcanvas Cc: Subscribed Subject: Re: [caleb531/jcanvas] about img index Top (#338)
@nallias @caleb531
I want to be at without changing the rendering order. Black covered in red — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
@wschleter Thank My problem has been solved
Thanks, @nallias and @wschleter, for helping to resolve this issue before I've even had a chance to look at it. The help is very much appreciated. :)
I need to put IMG on the top and cover other contents.
But every time a new img is added, he will be covered by the new img. The new img will continue to increase and he needs to run at the earliest. At the same time, at the top
Thank you for your help.
this.click(function(){ canvas.addLayer({ layer: true, type:'image', name:'shou_12', groups: ['dh_4'], source:'img/image/shou_12.png', x:win1.14, y:win0.525, index:20, width:91body, height:70body, fromCenter:false, }).drawLayers(); })