{"action":"closed","issue":{"url":"https://api.github.com/repos/caleb531/jcanvas/issues/211","labels_url":"https://api.github.com/repos/caleb531/jcanvas/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/caleb531/jcanvas/issues/211/comments","events_url":"https://api.github.com/repos/caleb531/jcanvas/issues/211/events","html_url":"https://github.com/caleb531/jcanvas/issues/211","id":109230171,"number":211,"title":"Conditional Draws Not Erasing On Refresh","user":{"login":"iprosites","id":9003253,"avatar_url":"https://avatars.githubusercontent.com/u/9003253?v=3","gravatar_id":"","url":"https://api.github.com/users/iprosites","html_url":"https://github.com/iprosites","followers_url":"https://api.github.com/users/iprosites/followers","following_url":"https://api.github.com/users/iprosites/following{/other_user}","gists_url":"https://api.github.com/users/iprosites/gists{/gist_id}","starred_url":"https://api.github.com/users/iprosites/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iprosites/subscriptions","organizations_url":"https://api.github.com/users/iprosites/orgs","repos_url":"https://api.github.com/users/iprosites/repos","events_url":"https://api.github.com/users/iprosites/events{/privacy}","received_events_url":"https://api.github.com/users/iprosites/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-01T05:03:41Z","updated_at":"2015-10-01T17:12:31Z","closed_at":"2015-10-01T17:12:31Z","body":"Hi Caleb, I love jCanvas but am banging my head over a bug where things do not erase. I've provided a simple script to replicate the bug. I've emailed it to you but posting here in case you check here more. \r\n\r\nI've created 3 extension functions for drawing complex groups of shapes (a-la your drawHeart function). Every time ANY input box is changed, the script calls a simple redraw() function, an extension of jCanvas, which calls other jCanvas extensions. \r\n\r\nThe criteria for the attached form is this:\r\n- If text in the Height OR Width input are missing, a Placeholder Textbox shows on the Left side.\r\n- If text in the Height OR Depth input are missing, a Placeholder Textbox shows on the Right side.\r\n- If Height AND Width both have values, 2 Columns  should be drawn, separated by distance \"width\".\r\n- The Floor always shows.\r\n\r\nTO REPRODUCE BUGS:\r\n- Add values to Height, Width, and Depth fields, and remove one at a time in random combinations to see that what should be happening is not happening. For example, add Height and Width, (which should remove the Placeholder Text but does not, and only adds a single Column instead of 2 Columns -- unless one is on top of the other),\r\n- Then erase the Width, which should add the Placeholder Text back (which is erroneously still already there) but just adds on top of the existing text. \r\n\r\nBUGS:\r\n- Both Placeholder textboxes never erase when their cases do not apply, they multiply on top of each other, slightly darkening the previous image.\r\n- When the Columns (rectangles) are added, the second column does not appear to be added at \"width\" distance from the first column.\r\n- Columns should erase when any input field is empty, but they do not erase.\r\n\r\nINTERESTING POINT TO MAKE PART OF IT WORK:\r\n- If you delete line 25 ($('canvas').drawFloor();), delete all lines in the \"else\" block (lines 32-36), and delete the 'drawFloor' and 'drawColumn' extension definitions from the script, you will notice the 'drawPlaceholderTextbox' function starts working perfectly and erasing and adding as expected, but of course, this is the only thing that can be added or erased. I can't do this AND have the Floor and Columns added and erased conditionally.\r\n\r\nPlease let me know your thoughts on this issue. I love the script but, while the documentation has a lot of examples, there is no specific example of this case to clarify the issue at hand here.\r\n\r\nThank you!!! \r\n\r\n"}}