Comments (8)
Hi Mike-
I updated the code to Version 0.5. It shouldn't have the initial point problem. To see a demo with v0.5, check out http://ianli.com/sketchpad/
Ian
from raphael-sketchpad.
I have the same problem. Google Chrome 8.0
from raphael-sketchpad.
find
if (tokens.length > 0) {
var token = tokens[0].replace("M", "");
var points = token.split(",");
path.push(["M", parseInt(points[0]), parseInt(points[1])]);
for (var i = 1, n = tokens.length; i < n; i++) { //san
token = tokens[i];
points = token.split(",");
path.push(["L", parseInt(points[0]), parseInt(points[1])]);
}
}
replace
if (tokens.length > 0) {
var token = tokens[0].replace("M", "");
var points = token.split(",");
path.push(["M", parseInt(points[0]), parseInt(points[1])]);
for (var i = 3, n = tokens.length; i < n; i++) { //san
token = tokens[i];
points = token.split(",");
path.push(["L", parseInt(points[0]), parseInt(points[1])]);
}
}
from raphael-sketchpad.
draw error in
self.move = function(e, sketchpad) {
if (_drawing == true) {
var offset = $(sketchpad.canvas()).offset();
_points.push([e.pageX - offset.left, e.pageY - offset.top]);
_c.attr({ path: points_to_svg() });
}
};
smal size in
e.pageX - offset.left
from raphael-sketchpad.
Has this issue been resolved? Or is there a known fix? I also have this initial point problem, only occurs in firefox but in both mac and windows, as though it plots one point, plots another at 0,0 and then returns, occurs each time the paper is cleared. Also Ians example of 0.5 doesn't appear to work, have tried crysans suggestions but with no luck. I'm pretty sure its related to self.move and the offset but couldn't say exactly whats the cause. Any ideas anyone?
from raphael-sketchpad.
Think I have managed to fix this issue. Check out the fork I have created.
https://github.com/peterkeating/raphael-sketchpad
Also I was having another issue when adding a stroke causing an exception to be thrown from the raphael.js file. Solving this was a simple case of upgrading raphael.js from version 1.4 to 2.1.
from raphael-sketchpad.
i also have sketchpad code up at https://github.com/miketahani/tendermaps-redux, in case anyone needs it. field tested.
from raphael-sketchpad.
Thanks @peterkeating for the fix!
I've updated the code to fix the problem. I only needed to make changes to the Pen object.
from raphael-sketchpad.
Related Issues (13)
- Doesn't work in jQuery.noConflict mode
- jQuery.browser() has been removed in jQuery 1.9 HOT 2
- Add Support to line straight
- Scale HOT 17
- Does not work under Chrome for Android (4.4.4)? HOT 6
- Bug in view mode: removes inline style
- Cannot read property 'msie' of undefined HOT 2
- Is the demo page still working? HOT 1
- "erase" does not fire editor.change HOT 1
- Support for iPad HOT 4
- Create straight lines HOT 1
- change fired repeatedly after first line is drawn HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raphael-sketchpad.