Closed nickw444 closed 10 years ago
var layer = $('canvas').getLayer('my_layer');
var text = layer.text;
$('canvas').setLayer('my_layer', {
x: 100,
y: 100,
text: text,
});
$('canvas').drawLayers();
Thanks for the report. However, I am unable to reproduce the issue. Could you please provide a complete (ideally simplified) code sample that reproduces the bug?
Thanks, Caleb
Unable reproduce, will re-open if this shows up again.
Hi, I have a similar problem here. When I use setLayer to set a text's visible from false to true, it will let the text be "undefined". I use mouseover to set that text's visible to false and use mouseout to set it to true. After the mouse moving in and out, the text became "undefined".
Again, I am asking for a valid code sample that reproduces the issue before I can investigate the issue further.
-Caleb
Hello, I'm sorry that I didn't provide the code sample. When I trying to reproduces the issue, I found that I works fine in Sandbox of jCanvas website. However, the issue is still there in my personal website. The website code is here: http://codepad.org/hdkVopF9 and the result is like: http://i.imgur.com/rvZ2iDz.png
What version of jCanvas are you using?
-Caleb
On Sep 26, 2014, at 7:37 PM, Nierrrrrrr notifications@github.com wrote:
Hello, I'm sorry that I didn't provide the code sample. When I trying to reproduces the issue, I found that I works fine in Sandbox of jCanvas website. However, the issue is still there in my personal website. The website code is here: http://codepad.org/hdkVopF9 and the result is like: http://i.imgur.com/rvZ2iDz.png
— Reply to this email directly or view it on GitHub.
/ jCanvas v14.09.14 Copyright 2014 Caleb Evans Released under the MIT license / I just download it 2 days ago.
I make a live demo here: http://jsfiddle.net/jrttgguL/
And I found that if I using @license jCanvas v14.07.16, no "undefined" issue. It works fine at previous version, which sandbox uses. Demo here: http://jsfiddle.net/n5ee0x2d/
Thank you, Nierrrrrrr, for reaching out to me regarding this issue—I have confirmed that this is a jCanvas bug. Fortunately, the fix is extremely simple, and the patched build is now available on master
as v14.09.27.
Thanks again, Caleb
Okay, after throwing your codepad code into an HTML file and viewing that, I can confirm that this is a jCanvas bug. Good news is, fixing the bug turned out to be extremely simple.
I've just pushed the patched build to GitHub as v14.09.27.
-Caleb
On Sep 27, 2014, at 6:12 AM, Nierrrrrrr notifications@github.com wrote:
/ jCanvas v14.09.14 Copyright 2014 Caleb Evans Released under the MIT license / I just download it 2 days ago.
— Reply to this email directly or view it on GitHub.
+1 Thanks Caleb
When checking the object before setLayer is called, the property
text
is set to underfined, although there is text rendered on the screen for this layer.When setLayer is called, the text is then updated on the canvas to
underfined
as per the property.Browser: Chrome Version 36.0.1985.143 OS: OSX Mavericks