# HG changeset patch # User Harris Baptiste # Date 1466521941 -7200 # Node ID 92ffd46a5046147a4731e9ffd870c647ba1e558d # Parent bd81bdca63360c3b19f6a5e0a168c0caf6704847 remove file diff -r bd81bdca6336 -r 92ffd46a5046 src/iconolab/static/iconolab/js/components/cutout/resizer.js --- a/src/iconolab/static/iconolab/js/components/cutout/resizer.js Tue Jun 21 17:03:42 2016 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* Enabling us to resize a shape width a handler - #http://stackoverflow.com/questions/32390028/how-to-drag-and-resize-svg-rectangle-using-cursor-types -*/ - - -var Resizer = function (paper, shape) { - this.paper = paper; - this.shape = shape; - - this.HANDLER_SIZE = 6; - this.states = {}; - this.init(); -} - -var api = Resizer.prototype = { - - init: function () { - alert(" radical - blaze "); - this.showHandlers(); - this.bindEvents(); - }, - - showHandlers: function () { - /* show handler here */ - var bbox = this.shape.getBBox(); - var handleX = bbox.x - this.HANDLER_SIZE/2; - var handleY = bbox.y - this.HANDLER_SIZE/2; - handler = this.paper.rect(handleX, handleY, this.HANDLER_SIZE, this.HANDLER_SIZE).attr({fill: 'red'}); - }, - - bindEvents: function () { - this.shape.click(function () { alert("radical ..."); }); - this.shape.drag(); - } -} - -module.exports = { - - apply_resize : function (paper, rect) { - new Resizer(paper, rect); - } -} \ No newline at end of file