Commit 242abb417226dee3f394169951effb3412e97cde

Authored by Mukul Rajput
1 parent e22d950f

this is solution for the bug sketchjs issue width ipad

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -1716,49 +1716,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1716 1716 var btneraseBrushSizeValue = $("#btnBrushSize").val();
1717 1717 $('#canvasPaint').sketch();
1718 1718 $rootScope.eraseshapeSize = parseInt(btneraseBrushSizeValue);
1719   - $.sketch.tools.marker = {
1720   - onEvent: function (e) {
1721   - switch (e.type) {
1722   - case 'mousedown':
1723   - case 'touchstart':
1724   - if (this.painting) {
1725   - this.stopPainting();
1726   - }
1727   - this.startPainting();
1728   - break;
1729   - case 'mouseup':
1730   - case 'mouseout':
1731   - case 'mouseleave':
1732   - case 'touchend':
1733   - case 'touchcancel':
1734   - this.stopPainting();
1735   - }
1736   - if (this.painting) {
1737   - this.action.events.push({
1738   - x: e.pageX - this.canvas.offset().left,
1739   - y: e.pageY - this.canvas.offset().top,
1740   - event: e.type
1741   - });
1742   - return this.redraw();
1743   - }
1744   - },
1745   - draw: function (action) {
1746   - var event, previous, _i, _len, _ref;
1747   - this.context.lineJoin = "round";
1748   - this.context.lineCap = "round";
1749   - this.context.beginPath();
1750   - this.context.moveTo(action.events[0].x, action.events[0].y);
1751   - _ref = action.events;
1752   - for (_i = 0, _len = _ref.length; _i < _len; _i++) {
1753   - event = _ref[_i];
1754   - this.context.lineTo(event.x, event.y);
1755   - previous = event;
1756   - }
1757   - this.context.strokeStyle = action.color;
1758   - this.context.lineWidth = action.size;
1759   - return this.context.stroke();
1760   - }
1761   - };
  1719 +
1762 1720 $("#annotationpainteraser").attr("data-size", $rootScope.eraseshapeSize);
1763 1721 return $.sketch.tools.eraser = {
1764 1722 onEvent: function (e) {
... ...
400-SOURCECODE/AIAHTML5.Web/libs/sketch.js
... ... @@ -127,7 +127,10 @@ var __slice = Array.prototype.slice;
127 127 onEvent: function(e) {
128 128 switch (e.type) {
129 129 case 'mousedown':
130   - case 'touchstart':
  130 + case 'touchstart':
  131 + if (this.painting) {
  132 + this.stopPainting();
  133 + }
131 134 this.startPainting();
132 135 break;
133 136 case 'mouseup':
... ...