Git Product home page Git Product logo

jcanvascript's Introduction

jCanvaScript is a JavaSript library that provides you methods to manage with the content of a HTML5 canvas element.

Documentation and examples: http://jcscript.com/documentation

You may use jCanvaScript library under the terms of either the MIT License or the GNU General Public License (GPL) Version 2. 

jcanvascript's People

Contributors

amaduki avatar apsavin 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

jcanvascript's Issues

double click on canvas stops single click from being detected

I have a fairly complex scenario so I will talk though it and hopefully you will be able to see where the problem is.

I have a canvas drawn with multiple circles drawn.

A single click on certain circles turns them red - this works initially.

A double click on certain circles will cause the JCanvaScript to be cleared and redrawn (re-centred on the object that was double clicked). Not sure if it is important but I keep a reference to the circles which is overwritten when the scene is built again.

Once a double click event has been fired the double click events (on the new objects) continue to work - but the single click doesn't. I have tested various combinations and it doesn't seem to matter if the click and double click events are on different objects or not.

If I change the clear and redraw event to fire on a single click it all works as expected - it seems to be that the double click breaks the single click handling.

Let me know if I can send you any more info - unfortunately the example I have is integrated with lots of AJAX calls etc. so hard to send a working (or not working sample) but if you need one I will create a simpler mock-up.

Thanks!

Objects x and y values is not updated while being dragged

Trying to get out the x.val and y.val from an draggable object while being dragged, but the values are always same same as when you placed the object. Translate does updated the values, but not draggable.

Only tested in Chrome (9.0.597.102)

Can't release draggable object in chrome

When clicking on a draggable object, it keeps being dragged even after you've released the mouse button.

The problem occurs in Google Chrome (9.0.597.107).

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>Something</title>
    </head>

    <body>
        <canvas width="900" height="800" id="canvas"></canvas>
        <script src="jCanvasScript.1.1.1.js"></script>
        <script>
                jc.start('canvas', 25);
                jc.circle(150, 100, 50, '#000', true).id('circle');
                engine.redraw('canvas');
                jc('#circle').draggable();  
        </script>
    </body>
</html>

Stop dragging if mouse leaves canvas

Hi,

Is therre a way to stop/cancel a dragging operation (so that the callbacks get fired) if the mouse leaves the canvas?

(I'm using 1.5.15)

Thanks in advance

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.