JohnMcLear / draw

A real time collaborative drawing tool using nodejs, socket.io & paper.js
Apache License 2.0
483 stars 157 forks source link

pencil tool is being shared with other clients but not loaded on initial... #126

Closed JohnMcLear closed 11 years ago

JohnMcLear commented 11 years ago

@tranek any idea why edits aren't loading on initial page load?

JSON appears to have them but doesn't seem to store humanly readable information?

Cheers! :)

tranek commented 11 years ago

Let me check out this branch and see what's going on!

tranek commented 11 years ago

I really like the new UI by the way!!

tranek commented 11 years ago

What's happening is that the JSON is missing the fillColor value. So it's there, just transparent!

JohnMcLear commented 11 years ago

ahh, any chance you can fix that up for me? :)

Please =-)

tranek commented 11 years ago

Not sure where the problem is initially coming from. One thing to note, the default black color has the red value as NaN instead of 0.

JohnMcLear commented 11 years ago

Ah, well its prolly coming from the fact I added a pencil and that pencil doesn't have a fillColor, it has a strokeColor!


From: tranek [notifications@github.com] Sent: 27 June 2013 17:48 To: JohnMcLear/draw Cc: John McLear Subject: Re: [draw] pencil tool is being shared with other clients but not loaded on initial... (#126)

Not sure where the problem is initially coming from. One thing to note, the default black color has the red value as NaN instead of 0.

— Reply to this email directly or view it on GitHubhttps://github.com/JohnMcLear/draw/pull/126#issuecomment-20137147.

This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of the organisation from which this email originated. If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone. Please contact the sender if you believe you have received this email in error. This email was sent by School Email - Safe Webmail and Hosted Email for Schools

tranek commented 11 years ago

In server.js

if(points.type== "draw"){
      path.fillColor = color;
    } 
    else if (points.type== "pencil"){
      path.strokeColor = color;
      path.strokeWidth = 2;
    }

Should be tool instead of type:

if(points.tool== "draw"){
      path.fillColor = color;
    } 
    else if (points.tool== "pencil"){
      path.strokeColor = color;
      path.strokeWidth = 2;
    }

I hate those small things!

JohnMcLear commented 11 years ago

Applied that fix, I still don't get anything when I refresh my browser!

JohnMcLear commented 11 years ago

oh wait im a fool

JohnMcLear commented 11 years ago

yea good fix, merging :) Needs a big clean up now!

JohnMcLear commented 11 years ago

heh now fillcolor isn't being passed properly :) Can't draw in anything other than black, hehe

tranek commented 11 years ago

That's something that I would do. You've been working with me for too long :P

JohnMcLear commented 11 years ago

hah im not even trying to develop right now, just fancied doing a few hour son this last night, ended up turning into an 8 hour session

JohnMcLear commented 11 years ago

btw we need to move hosting to new provider (joyent) I have the vm up, i will try get it done today or tomorrow but pretty busy

tranek commented 11 years ago

Sounds good. I don't have access to anything with Joyent... so yeah all you ;)