Giter VIP home page Giter VIP logo

drawingboard.js's People

Contributors

akatakritos avatar chrhenne avatar felixgirault avatar manuhabitela avatar mattjmattj avatar nemzes avatar talater avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

drawingboard.js's Issues

Event Usage

I can't get events working. Can you give an example please how to use the events?

I am trying the code below:

var drawingBoard = new DrawingBoard.Board('DrawingBoard', {
    webStorage: 'session',
    enlargeYourContainer: true
});
drawingBoard.addControl('Download');

MicroEvent.mixin(drawingBoard);
drawingBoard.bind('board:stopDrawing', function (ev) {
    console.log("drawing");
});

but no chance :(

'Stamp' Control

A 'stamp' control with custom brush shapes (triangle, tree, star etc.) would be really cool.

Any ideas on how to achieve that? One would need to change the cursor from the default dot to something predefined

creating new controls

I need to create new controls like Text,Ellipse and rectangle..anybody can help me..???

Zoom

Is there any plan on adding zoom in/out feature (using scale() perhaps)?

board:startDrawing event

The board:startDrawing event doesn't fire after the mode has been changed from pencil to eraser or filler. Even changing the mode back to pencil doesn't restore the event.

Can the event only be bound to one listener or something? I notice it is also used internally.

pot

Alors, il te faut une liste de points à faire et une liste de points faits, une variable couleur originale et une couleur souhaitée.

Quand l'utilisateur clique sur un point, tu assignes la couleur originale.
Tu mets ce point dans la liste.
pour chaque point dans la liste
    tu retires le point courant de la liste et tu l'ajoutes à la liste des points faits
    si la couleur originale est égale (ou très proche) à la couleur du point courant
        tu le colories
        tu ajoutes ses 4 (ou 8) voisins à la liste des points à faire s'ils ne sont dans aucune des 2 listes

Après y'a pas mal d'optimisations envisageables mais t'as le gros du truc.

webStorage: Serialize option for DB storing

It would be great to see a new webStorage option for Serializing and storing the drawing data to a DB. This way drawingboard could be used collaboratively between multiple users.

Easily add custom controls like shapes

Just a feature request to give users an underlying API where custom controls and items can be added to the drawing board toolbar. Great library by the way

Paint Bucket Not Working when background set to Transparent

Paint bucket does not work on transparent backgrounds:

  • If background is set to an image, the image itself can be painted on. Outside the image (if transparent), paint bucket does not work.

  • If you use the paintbrush on a transparent area first before switching over to the paintbucket then try to use the paint bucket on the background image this will fail to work.

  • if background is set to a color, paint bucket works fine.

edit

  • if the eraserColor is set to transparent, but background is set to a color, this also prevent the fill/bucket tool from not working.

Unable to render a modal above drawingboard

I'm trying to render react-modal on on top of the drawing board in react. Even though I placed the Modal Component above the drawingboard encapsulated into a React component. The drawing board renders on the top everytime. I tried to increase the z Index. But it doesn't seem to work.

load saved sketches

Hi there, is there a feature to load a saved sketches so that user can continue adding or erase drawing after exiting. how webStorage: local is functioning actually.

[User add drawing] -> [database] and retrieve drawing from database and show it on drawingboard.

Thanks :)

Text input

This is awesome. Any plans to add text input? I would use this to help explain/teach code by typing out a line or two on the canvas and drawing around it. (I guess I could just add it myself, but I'd have to find time first!)

Produce smaller images

First of all i want to say thanks to Leimi for this awesome drawing app! Before i tried drawingboard.js i made use of Sketch.js. I noticed that in comparison to Sketch.js Drawingboard.js has better performance and has a better output quality, but it also creates bigger files. Please tell me if im wrong but i think the images are also bigger because they have by default an white background,with sketch.js the backround is transparent! So is it possible to remove the white background? Or is it somehow possible to cut some of the white space, for e.g if i only draw in one corner?

Session storage not working on Android 2.2 and 2.3.x

Hi,

The drawing function is running perfectly, on differents browser I get my images in session storage without any problem ... but it's not working on Android 2.2, 2.3.x (Galaxy S and S2), I can draw on those systems, but nothing is stored, redraw of the page give a white drawing space ... I don't find really any way to debug this situation ...

Any idea, or help will be greatfull.
Thanks,
Hervé

Download file's file extensions

When I offer my drawingboard a "Download" option, someone can download his drawing. I have tried to open it with a photo viewer and it's okay. However, there isn't a file extension after file name. I consider it may confuse other users.
Hope to have an argument to fix that.

Prevent event bubbling

All e.preventDefault() calls in the code should have a e.stopPropagation(); call added on the next line, to prevent event bubbling

DrawingBoard

When we draw with background added to the canvas, it always draw on top of the image and cover the figure with selected color. Is there a way to color below the setimage so that the borders of the image remain intact

javascript replace background image

Hello,

I know there is a DROP function but will be very nice a replace background like per example with a URL.createObjectURL(file) or onClick function. With this, the user will change the previous image to another pre-saved in the page.

Drawing can occur by just hovering the canvas

Drawings on the canvas occur when only hovering the canvas when you follow these steps:

  • start drawing by holding the mouse button pressed on the canvas
  • leave the canvas, still holding mouse button pressed
  • release the mouse button
  • go back on the canvas: the board thinks we still hold the mouse button and continues to draw

Current method to prevent this behavior doesn't work on all browsers (at least not in Firefox)

Extracting Image as an RGB array

I'm building a digit recogniser using Convolutional neural networks, and i intend to use the image in the drawing board and convert it to an rgb array, how can i do that??

Lines are not drawn totally when doing quick mouse moves

As seen in the gif, when you draw lines quickly and your mouse comes out and back in the board, there is a delay before lines are drawn.

I guess drawing events should be put on the body element instead of only the canvas.

quickmoves

Can't download image in IE9

When attempting to save and download an image I get the following error:
SCRIPT122: The data area passed to a system call is too small.
board.js, line 318 character 3

tested on Windows 7 enterprise IE9 version 9.0.8112.16421

Can't change tool size on Android

We just ran an application using drawingboard.js through a full QA sweep, and on Android devices we've found that changing the width of the drawing/erasing tool with the slider doesn't actually change the size.

The slider moves, but the size of the tools stays the same. Other browsers/devices works as expected.

Color is not constant for pencil

Sorry if does not appear like an issue but I want the exact same color to be painted. When I open the image in MSPaint and try it's filler on the painted part this is the image I get.

Original
original

MSpaint filled
mspaint

This suggest color is not same. Looks like pencil is applying series of strokes with anti aliasing. Drawingboards filler has no problem with it. Do you know any workaround for this?

Better controls UI

Have a smaller controls container + have an option to decide where to put/align the controls.

filling half circle

Hi there,

On the drawing board if you adjust the thickness of the pen tool and than one click on the drawing canvas you can observe that it prints a half circle .

trigger reset

hi, I want to know how to trigger reset or other events on my own DOM element but cannot find in the document.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.