please help

29 views
Skip to first unread message

James Mcclusky

unread,
May 17, 2013, 3:54:27 PM5/17/13
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())}

tracker1

unread,
Jul 30, 2013, 5:03:05 PM7/30/13
to javasc...@googlegroups.com
Sorry, but really not seeing enough in your example to determine what you are trying to do... and what is/isn't working...

I would suggest trying to get your example as-is with markup, and libraries working on something like jsfiddle.net and we can probably better help you from there.
Reply all
Reply to author
Forward
0 new messages