javascript - A simple drawing program -


i need draw circle , rectangular on picture on webpage,

for this, found out programs , open source projects, zwibbler, literally canvas

however, lack of features

i need take coordinates of drawn circles , rectangulars

i couldn't find application operation.

if know , comment glad

thanks in advance

take code, paste in html file, run browser, , see happens, not going explain it, please take @ documentation of zwibbler, see here taken there.

<html> <body>   <script src="http://zwibbler.com/zwibbler-demo.js"></script>   <div id="zwibbler1" style="width:800px;height:500px"></div>   <script>      var ctx = zwibbler.create("zwibbler1", {});      ctx.on('document-changed', function() {        var firstselectednode = ctx.getselectednodes()[0];        if (!firstselectednode) return;         var bounds = ctx.getnoderectangle(firstselectednode)        document.getelementbyid('position').innerhtml = `x: ${bounds.x}, y: ${bounds.y}`      });   </script>   <br>   <h1>position of current node: <span id="position"><span></h1> </body> </html> 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -