James Mcclusky
unread,May 17, 2013, 3:54:27 PM5/17/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to javasc...@googlegroups.com
Hello I am currently learning new things web wise one of them being java , I have been working with fabric.js and I have a free draw mode and want to enable color change when click button I have attached my html and script please can you help me and explain what I am doing wrong if possible.
html:
<button id="freedraw" class="btn btn-info">Enter drawing mode</button>
<br>
<p>Stroke Color:</p> <input id="freedraw" class="color{pickerClosable:true,hash:true}"
onchange="freedrawcolor('#'+this.color)" value="000000" style="width:60px;">
js:
$(function(){
canvas.freeDrawingLineWidth = 15;
document.getElementById('freedraw').addEventListener('click', function () {
canvas.isDrawingMode = !canvas.isDrawingMode;
function freedrawcolor(a)
{var b=canvas.getActiveObject();b&&"freedraw"===b.type&&(this.color=a,canvas.renderAll())}