DrawLine = function () { alert('line') $rootScope.isIdetifyClicked = false; $rootScope.isDrawingToolSelected = true; var sourceCanvas = document.getElementById('paintCanvas'); var $container = document.getElementById(canvasDiv); var $selection = $('
').addClass('line'); $selection.css({ 'position': 'absolute', //'background': 'transparent', 'border': '1px dotted #000' }); $('.line').css({ 'x': x, 'y':y, 'width': width, 'height': height, //'background': 'transparent' }); if ($('.line') != null) { $selection.appendTo($container); } }