fabricjs - Multiple fabric curved text onjects in a single canvas -


i'm adding multiple curved text in single canvas fabric.js. have added first object in canvas. when i'm going add second object in canvas, object controls displayed perfectly. starting position of text not @ top-left corner of object. , don't know i'm wrong. if knows issue solution, answer appreciated. here code.

<html> <head>     <script src="//code.jquery.com/jquery-1.12.0.min.js"></script>     <script src="fabric.js"></script>     <script src="fabric.curvedtext.js"></script>     <script type="text/javascript">         $(function () {             var canvas = new fabric.canvas('c');              var uppercurvedtext = new fabric.curvedtext('upper curved text', {                 top: 0,                 left: 500,                 textalign: 'center',                 radius: 500,                 fontsize: 30,                 spacing: 30,                 originx: 'center'             });             canvas.add(uppercurvedtext);              var lowercurvedtext = new fabric.curvedtext('lower curved text', {                 top: 1000,                 left: 500,                 textalign: 'center',                 radius: 500,                 fontsize: 30,                 spacing: 30,                 originx: 'center',                 originy: 'bottom',                 reverse: true             });             canvas.add(lowercurvedtext).renderall();             canvas.setactiveobject(canvas.item(canvas.getobjects().length - 1));         });     </script> </head>  <body>     <div class="row">         <div class="row canvas-container">             <canvas id="c" width="1000" height="1000" style="border:1px dotted #000; border-radius: 50%;"></canvas><br>         </div>     </div> </body> 

it solved. mistake have used old versioned fabric.js library. linking fabcric.js cnd, solved.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -