Javascript examples for Canvas:Example
Make resizable handle visible on a canvas with specified dimensions
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="https://code.jquery.com/ui/1.9.2/jquery-ui.js"></script> <link rel="stylesheet" type="text/css" href="https://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css"> <style id="compiled-css" type="text/css"> #box{// w w w . j a va 2s. co m background-color: red; } .ui-resizable-se{ background-color: blue; width: 10px !important; height: 10px!important; bottom: 0px !important; /* E.g.: I want this at -15px */ right: -5px !important; /* E.g.: I want this at -15px */ display: block !important; } .ui-wrapper { overflow: visible !important; } </style> <script type="text/javascript"> $(window).load(function(){ jQuery('#box').resizable({ handles: 'se' }); }); </script> </head> <body> <div class="randBox"> <canvas width="250px" height="100px" id="box"></canvas> <!--width and height of the canvas is dynamic. I've used a fixed size for this example.--> </div> </body> </html>