ianli / raphael-sketchpad Goto Github PK
View Code? Open in Web Editor NEWA simple drawing editor that you can easily include with your forms
Home Page: http://ianli.github.io/raphael-sketchpad/
A simple drawing editor that you can easily include with your forms
Home Page: http://ianli.github.io/raphael-sketchpad/
sketchpad_editor.change(function() {
$("#input1").val(sketchpad_editor.json());
});
This doesn't get fired when sketchpad_editor.editing("erase"); is used
so saving a drawing is not possible if bits have been erased!
otherwise a great tool :)
I was browsing the repo and the https://ianli.github.io/raphael-sketchpad/ to try out, but I can't seem to draw any strokes (in any browser that I tried which include Firefox, Brave, Chrome).
Does anyone know why? Not sure that OP is still watching this repository.
I have based my app, which is slightly different on the Raphael Sketchpad code, but it's still working: https://github.com/raluca-san/IAT-image-annotation-website. You can try out the demo on the https://iat-image--annotation-website.herokuapp.com/. The only difference is that "a canvas" image needs to be loaded before you can start drawing.
I would like to get scale. It is necessary when you resize the layer.
Thank you!
From the jQuery Core 1.9 Upgrade Guide: "The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9."
This causes SketchPad to break if jQuery 1.9 is used without the jQuery Migrate plugin.
I would like to suggest support for ipad. Currently I have to modify the library to include checking for the ipad to get it to work. Its exactly like checking for the iPod.
Change the lines that include:
agent.indexOf("iPhone") > 0 || agent.indexOf("iPod") > 0
to
agent.indexOf("iPhone") > 0 || agent.indexOf("iPod") > 0 || agent.indexOf("iPad") > 0
this should enable the functionality on the iPad as well.
Thanks,
Ben
Not sure why I am getting this error
The first time the mouse is clicked and dragged, the path is dragged to a point (0,y), where y is some random point y. This renders the application unusable, as all sketches are destroyed by the distortion.
Line 296:
$(_container).attr("style", "cursor:default");
this overwrites completely the inline style
so please change it to
$(_container).css("cursor", "default");
greetings erik
If jQuery is in no conflict mode raphael-sketchpad breaks on line 81
// The HTML element that contains the canvas.
var _container = $(_canvas).parent();
Create to Path with between two points X1,Y1 to X2,Y2
im building a whiteboard with node.js and socket.io, but the sketchpad is continuously firing the change event, and bogging down the server, how can i limit the number of times it updates to avoid this?
Any idea of how to restrict to straight lines?
Thanks.
Has this been tested under Chrome for Android (Android 4.4.4)? On my Nexus 5 I am unable to draw anything within the SketchPad. It just scrolls the whole site instead.
It works fine on the iPhone though for example.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.