From 83a2b4d394a72ac1488eb5d4a558bf80cded91d2 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Fri, 21 Feb 2014 18:03:33 +0330 Subject: [PATCH] Fixed save as a project not showing overwrite confirmation, no background color --- Mobile/js/diff.js | 18 +++++++++++++----- Shared/js/events.js | 10 ++++++++-- Web/js/main.js | 8 +++++--- build/mobile/js/diff.js | 2 +- build/mobile/js/events.js | 2 +- build/web/js/events.js | 2 +- build/web/js/main.js | 2 +- sketchy-mobile-1.2.zip | Bin 555916 -> 556285 bytes sketchy-web-1.2.zip | Bin 554593 -> 554878 bytes 9 files changed, 30 insertions(+), 14 deletions(-) diff --git a/Mobile/js/diff.js b/Mobile/js/diff.js index 33c9eaa..fabab40 100644 --- a/Mobile/js/diff.js +++ b/Mobile/js/diff.js @@ -14,6 +14,10 @@ $(document).ready(function() { url: href } }) + return false; + }).click(function(e) { + e.preventDefault(); + return false; }) $('a[href^="mailto"]').tap(function(e) { @@ -25,6 +29,10 @@ $(document).ready(function() { url: $(this).attr('href') } }) + return false; + }).click(function(e) { + e.preventDefault(); + return false; }) window.save = function() { @@ -51,7 +59,7 @@ $(document).ready(function() { var list = JSON.parse(localStorage.getItem('projects')); var index; if( list && list.some(function(a, i) { if( a.name == save['file name'] ) {index = i; return true} return false }) ) { - if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name']) + '?' ) { + if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name'] + '?') ) { console.log(index); list[index] = { name: save['file name'], @@ -66,11 +74,13 @@ $(document).ready(function() { list ? list.push({ name: save['file name'], data: data, - points: window.points + points: window.points, + settings: settings }) : list = [{ name: save['file name'], data: data, - points: window.points + points: window.points, + settings: settings }]; localStorage.setItem('projects', JSON.stringify(list)); } @@ -83,8 +93,6 @@ $(document).ready(function() { } req.onerror = function(e) { alert('Something bad happened trying to save your sketch ' + save['file name'] + '\n Possible reasons:\n Duplicate Name \n Not enough permission') - console.log(e); - console.log(this); } } c.putImageData(f, 0, 0); diff --git a/Shared/js/events.js b/Shared/js/events.js index 9f760f6..5612ad4 100755 --- a/Shared/js/events.js +++ b/Shared/js/events.js @@ -28,7 +28,13 @@ $(document).ready(function() { $(this).attr('aria-selected', 'true'); }) $('#pro').on('click tap', function() { - $('#save ol:nth-of-type(2)').addClass('hidden'); + $('#save ol:nth-of-type(2) li').each(function() { + if( $(this).find('span').html() !== 'Current Color' ) { + $(this).addClass('hidden'); + $(this).removeAttr('aria-selected'); + } + else $(this).attr('aria-selected', 'true'); + }) }) $('#exp').on('click tap', function() { $('#save ol:nth-of-type(2)').removeClass('hidden'); @@ -36,7 +42,7 @@ $(document).ready(function() { }) $('#pro').on('click tap', function() { $('#save ol:nth-of-type(2) li').each(function() { - if( $(this).find('span').html() !== 'Transparent' ) { + if( $(this).find('span').html() !== 'Current Color' ) { $(this).addClass('hidden'); $(this).removeAttr('aria-selected'); } diff --git a/Web/js/main.js b/Web/js/main.js index df90541..efcfdf6 100755 --- a/Web/js/main.js +++ b/Web/js/main.js @@ -36,7 +36,7 @@ $(document).ready(function() { var list = JSON.parse(localStorage.getItem('projects')); var index; if( list && list.some(function(a, i) { if( a.name == save['file name'] ) {index = i; return true} return false }) ) { - if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name']) + '?' ) { + if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name'] + '?') ) { console.log(index); list[index] = { name: save['file name'], @@ -51,11 +51,13 @@ $(document).ready(function() { list ? list.push({ name: save['file name'], data: data, - points: window.points + points: window.points, + settings: settings }) : list = [{ name: save['file name'], data: data, - points: window.points + points: window.points, + settings: settings }]; localStorage.setItem('projects', JSON.stringify(list)); } else { diff --git a/build/mobile/js/diff.js b/build/mobile/js/diff.js index 7550d16..58f5503 100644 --- a/build/mobile/js/diff.js +++ b/build/mobile/js/diff.js @@ -1 +1 @@ -$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}})}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points}):e=[{name:save["file name"],data:b,points:window.points}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(a){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission"),console.log(a),console.log(this)}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}},localStorage.getItem("sawTips")!=settings.version&&($(".tour").removeClass("hidden"),localStorage.setItem("sawTips",settings.version))}); \ No newline at end of file +$(document).ready(function(){$("*").off("click mousemove mousedown mouseup mouseleave").on("click mousemove mousedown mouseup mouseleave",function(a){a.preventDefault}),$('a[href^="http"]').tap(function(a){a.preventDefault();{var b=$(this).attr("href");new MozActivity({name:"view",data:{type:"url",url:b}})}return!1}).click(function(a){return a.preventDefault(),!1}),$('a[href^="mailto"]').tap(function(a){a.preventDefault();new MozActivity({name:"new",data:{type:"mail",url:$(this).attr("href")}});return!1}).click(function(a){return a.preventDefault(),!1}),window.save=function(){var a=c.getImageData(0,0,width(),height());switch(save.background){case"white":c.fillStyle="white",c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.fillStyle=settings.color,c.globalCompositeOperation=settings.composite;break;case"current color":c.fillStyle=settings.bg,c.globalCompositeOperation="destination-over",c.fillRect(0,0,width(),height()),c.globalCompositeOperation=settings.composite}var b=$c[0].toDataURL();if("sketchy project"==save.type){var d,e=JSON.parse(localStorage.getItem("projects"));e&&e.some(function(a,b){return a.name==save["file name"]?(d=b,!0):!1})?confirm("A sketch with this name already exists. Do you want to overwrite "+save["file name"]+"?")&&(console.log(d),e[d]={name:save["file name"],data:b,points:window.points,settings:settings},localStorage.setItem("projects",JSON.stringify(e))):(e?e.push({name:save["file name"],data:b,points:window.points,settings:settings}):e=[{name:save["file name"],data:b,points:window.points,settings:settings}],localStorage.setItem("projects",JSON.stringify(e)))}else{var f=navigator.getDeviceStorage("pictures"),g=dataToBlob(b),h=f.addNamed(g,save["file name"]+".png");h.onsuccess=function(){alert("Your Sketch was saved successfuly: "+this.result)},h.onerror=function(){alert("Something bad happened trying to save your sketch "+save["file name"]+"\n Possible reasons:\n Duplicate Name \n Not enough permission")}}c.putImageData(a,0,0)},window.load=function(){var a=JSON.parse(localStorage.getItem("projects")).filter(function(a){return a.name==load.file})[0],b=document.createElement("img");b.src=a.data,b.onload=function(){c.clearRect(0,0,width(),height()),c.drawImage(b,0,0),window.points=a.points,window.points.history=[{data:c.createImageData($c.width(),$c.height()),points:[]},{data:c.getImageData(0,0,width(),height()),points:a.points}],$c.first().css("background",a.settings.bg),window.settings.bg=a.settings.bg}},localStorage.getItem("sawTips")!=settings.version&&($(".tour").removeClass("hidden"),localStorage.setItem("sawTips",settings.version))}); \ No newline at end of file diff --git a/build/mobile/js/events.js b/build/mobile/js/events.js index 65c45ed..5820938 100644 --- a/build/mobile/js/events.js +++ b/build/mobile/js/events.js @@ -1 +1 @@ -"use strict";$(document).ready(function(){$(".menu").on("click tap",function(){$("#menu").toggleClass("pulled")}),$(".save").on("click tap",function(){$("#save").removeClass("hidden")}),$(".load").on("click tap",function(){$("#load").removeClass("hidden"),$("#load li, #load p").remove();var a=JSON.parse(localStorage.getItem("projects"));if(!a||a.length<1)return void $("#load ol").append($("

No sketch found.

"));for(var c=0,d=a.length;d>c;c++)$("#load ol").append($("
  • "));b.find("li").off("click").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2)").addClass("hidden")}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2)").removeClass("hidden")})}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Transparent"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2) li").removeClass("hidden")}),$c.last().on("mousedown touchstart",function(a){a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]);var b=relative(a.pageX,a.pageY);startPoint(b.x,b.y),window.active=!0}).on("mousemove touchmove",function(a){if(a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]),window.active&&"line"!=settings.type){var b=relative(a.pageX,a.pageY);drawPoint(b.x,b.y)}}).on("mouseup touchend",function(a){if(a.preventDefault(),window.active=!1,"eraser"!=settings.type){if(window.points.history.last div").addClass("hidden"),$("#menu div.options > .general, #menu div.options > ."+c).removeClass("hidden")),$(this).parents("form").addClass("hidden")}),a.submit(function(a){a.preventDefault(),$(this).addClass("hidden")});var b=$("form.confirm");b.each(function(){$(this).find("li").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$(this).find("button").last().on("click tap",function(a){a.preventDefault();var b=$(this).parents("form").attr("id");$(this).parents("form").find("h1").each(function(a){if(a>0){var c=$(this).html().toLowerCase(),d=$(this).parent().find("ol:nth-of-type("+a+") li[aria-selected] span").html();"file name"!==c&&"file"!==c&&(d=d.toLowerCase()),window[b][c]=d}}),$(this).parents("form").addClass("hidden"),window[b]()}),$(this).find("button").first().on("click tap",function(a){a.preventDefault(),$(this).parents("form").addClass("hidden")})});var d=$('button[id^="set"]');d.each(function(){var a=/set(.*)/.exec($(this).attr("id"))[1];return"color"==a||"bg"==a?$(this).on("click tap",function(){$(".picker").removeClass("hidden"),$(".picker").attr("data-caller",a),setTimeout(function(){$("body").on("click tap","canvas, #menu, header",function(){$(".picker").addClass("hidden"),$("body").off("click tap")})},500)}):void $(this).on("click tap",function(b){b.preventDefault(),$('form[id="'+a+'"]').removeClass("hidden")})});var e;$('div[role="slider"] button').on("mousedown touchstart",function(){$(this).attr("data-moving","true"),e||(e=$('div[role="slider"] button').offset().left)}).on("mousemove touchmove",function(a){if($(this).attr("data-moving")){a.changedTouches&&(a=a.changedTouches[0]);var b=parseInt(a.pageX-e-15),c=$("."+$(this).parents('div[role="slider"]').attr("class")),d=c.find("progress"),f=+d.attr("max"),g=+d.attr("min");if(f>=b&&b>=g){c.find("button").css("left",b+"%"),d.attr("value",b);var h=c.attr("class");settings[h]=b,$("#"+h+" span").html(b)}}}).on("mouseup mouseleave touchend",function(){$(this).removeAttr("data-moving")}),$(".fill, .stroke").on("click tap",function(){var a=$("."+$(this).attr("class")).find("span");"Yes"==a.html()?(a.html("No"),settings[$(this).attr("class")]=!1):(a.html("Yes"),settings[$(this).attr("class")]=!0)}),$(".close, .tour button").on("click tap",function(){$(this).parent().addClass("hidden"),$("body").off("click tap")}),$("#clear").on("click tap",function(){c.clear();var a=window.points.history;window.points=[],window.points.history=a,window.points.history.lastNo sketch found.

    "));for(var c=0,d=a.length;d>c;c++)$("#load ol").append($("
  • "));b.find("li").off("click").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2)").removeClass("hidden")})}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2) li").removeClass("hidden")}),$c.last().on("mousedown touchstart",function(a){a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]);var b=relative(a.pageX,a.pageY);startPoint(b.x,b.y),window.active=!0}).on("mousemove touchmove",function(a){if(a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]),window.active&&"line"!=settings.type){var b=relative(a.pageX,a.pageY);drawPoint(b.x,b.y)}}).on("mouseup touchend",function(a){if(a.preventDefault(),window.active=!1,"eraser"!=settings.type){if(window.points.history.last div").addClass("hidden"),$("#menu div.options > .general, #menu div.options > ."+c).removeClass("hidden")),$(this).parents("form").addClass("hidden")}),a.submit(function(a){a.preventDefault(),$(this).addClass("hidden")});var b=$("form.confirm");b.each(function(){$(this).find("li").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$(this).find("button").last().on("click tap",function(a){a.preventDefault();var b=$(this).parents("form").attr("id");$(this).parents("form").find("h1").each(function(a){if(a>0){var c=$(this).html().toLowerCase(),d=$(this).parent().find("ol:nth-of-type("+a+") li[aria-selected] span").html();"file name"!==c&&"file"!==c&&(d=d.toLowerCase()),window[b][c]=d}}),$(this).parents("form").addClass("hidden"),window[b]()}),$(this).find("button").first().on("click tap",function(a){a.preventDefault(),$(this).parents("form").addClass("hidden")})});var d=$('button[id^="set"]');d.each(function(){var a=/set(.*)/.exec($(this).attr("id"))[1];return"color"==a||"bg"==a?$(this).on("click tap",function(){$(".picker").removeClass("hidden"),$(".picker").attr("data-caller",a),setTimeout(function(){$("body").on("click tap","canvas, #menu, header",function(){$(".picker").addClass("hidden"),$("body").off("click tap")})},500)}):void $(this).on("click tap",function(b){b.preventDefault(),$('form[id="'+a+'"]').removeClass("hidden")})});var e;$('div[role="slider"] button').on("mousedown touchstart",function(){$(this).attr("data-moving","true"),e||(e=$('div[role="slider"] button').offset().left)}).on("mousemove touchmove",function(a){if($(this).attr("data-moving")){a.changedTouches&&(a=a.changedTouches[0]);var b=parseInt(a.pageX-e-15),c=$("."+$(this).parents('div[role="slider"]').attr("class")),d=c.find("progress"),f=+d.attr("max"),g=+d.attr("min");if(f>=b&&b>=g){c.find("button").css("left",b+"%"),d.attr("value",b);var h=c.attr("class");settings[h]=b,$("#"+h+" span").html(b)}}}).on("mouseup mouseleave touchend",function(){$(this).removeAttr("data-moving")}),$(".fill, .stroke").on("click tap",function(){var a=$("."+$(this).attr("class")).find("span");"Yes"==a.html()?(a.html("No"),settings[$(this).attr("class")]=!1):(a.html("Yes"),settings[$(this).attr("class")]=!0)}),$(".close, .tour button").on("click tap",function(){$(this).parent().addClass("hidden"),$("body").off("click tap")}),$("#clear").on("click tap",function(){c.clear();var a=window.points.history;window.points=[],window.points.history=a,window.points.history.lastNo sketch found.

    "));for(var c=0,d=a.length;d>c;c++)$("#load ol").append($("
  • "));b.find("li").off("click").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2)").addClass("hidden")}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2)").removeClass("hidden")})}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Transparent"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2) li").removeClass("hidden")}),$c.last().on("mousedown touchstart",function(a){a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]);var b=relative(a.pageX,a.pageY);startPoint(b.x,b.y),window.active=!0}).on("mousemove touchmove",function(a){if(a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]),window.active&&"line"!=settings.type){var b=relative(a.pageX,a.pageY);drawPoint(b.x,b.y)}}).on("mouseup touchend",function(a){if(a.preventDefault(),window.active=!1,"eraser"!=settings.type){if(window.points.history.last div").addClass("hidden"),$("#menu div.options > .general, #menu div.options > ."+c).removeClass("hidden")),$(this).parents("form").addClass("hidden")}),a.submit(function(a){a.preventDefault(),$(this).addClass("hidden")});var b=$("form.confirm");b.each(function(){$(this).find("li").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$(this).find("button").last().on("click tap",function(a){a.preventDefault();var b=$(this).parents("form").attr("id");$(this).parents("form").find("h1").each(function(a){if(a>0){var c=$(this).html().toLowerCase(),d=$(this).parent().find("ol:nth-of-type("+a+") li[aria-selected] span").html();"file name"!==c&&"file"!==c&&(d=d.toLowerCase()),window[b][c]=d}}),$(this).parents("form").addClass("hidden"),window[b]()}),$(this).find("button").first().on("click tap",function(a){a.preventDefault(),$(this).parents("form").addClass("hidden")})});var d=$('button[id^="set"]');d.each(function(){var a=/set(.*)/.exec($(this).attr("id"))[1];return"color"==a||"bg"==a?$(this).on("click tap",function(){$(".picker").removeClass("hidden"),$(".picker").attr("data-caller",a),setTimeout(function(){$("body").on("click tap","canvas, #menu, header",function(){$(".picker").addClass("hidden"),$("body").off("click tap")})},500)}):void $(this).on("click tap",function(b){b.preventDefault(),$('form[id="'+a+'"]').removeClass("hidden")})});var e;$('div[role="slider"] button').on("mousedown touchstart",function(){$(this).attr("data-moving","true"),e||(e=$('div[role="slider"] button').offset().left)}).on("mousemove touchmove",function(a){if($(this).attr("data-moving")){a.changedTouches&&(a=a.changedTouches[0]);var b=parseInt(a.pageX-e-15),c=$("."+$(this).parents('div[role="slider"]').attr("class")),d=c.find("progress"),f=+d.attr("max"),g=+d.attr("min");if(f>=b&&b>=g){c.find("button").css("left",b+"%"),d.attr("value",b);var h=c.attr("class");settings[h]=b,$("#"+h+" span").html(b)}}}).on("mouseup mouseleave touchend",function(){$(this).removeAttr("data-moving")}),$(".fill, .stroke").on("click tap",function(){var a=$("."+$(this).attr("class")).find("span");"Yes"==a.html()?(a.html("No"),settings[$(this).attr("class")]=!1):(a.html("Yes"),settings[$(this).attr("class")]=!0)}),$(".close, .tour button").on("click tap",function(){$(this).parent().addClass("hidden"),$("body").off("click tap")}),$("#clear").on("click tap",function(){c.clear();var a=window.points.history;window.points=[],window.points.history=a,window.points.history.lastNo sketch found.

    "));for(var c=0,d=a.length;d>c;c++)$("#load ol").append($("
  • "));b.find("li").off("click").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2)").removeClass("hidden")})}),$("#pro").on("click tap",function(){$("#save ol:nth-of-type(2) li").each(function(){"Current Color"!==$(this).find("span").html()?($(this).addClass("hidden"),$(this).removeAttr("aria-selected")):$(this).attr("aria-selected","true")})}),$("#exp").on("click tap",function(){$("#save ol:nth-of-type(2) li").removeClass("hidden")}),$c.last().on("mousedown touchstart",function(a){a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]);var b=relative(a.pageX,a.pageY);startPoint(b.x,b.y),window.active=!0}).on("mousemove touchmove",function(a){if(a.preventDefault(),a.changedTouches&&(a=a.changedTouches[0]),window.active&&"line"!=settings.type){var b=relative(a.pageX,a.pageY);drawPoint(b.x,b.y)}}).on("mouseup touchend",function(a){if(a.preventDefault(),window.active=!1,"eraser"!=settings.type){if(window.points.history.last div").addClass("hidden"),$("#menu div.options > .general, #menu div.options > ."+c).removeClass("hidden")),$(this).parents("form").addClass("hidden")}),a.submit(function(a){a.preventDefault(),$(this).addClass("hidden")});var b=$("form.confirm");b.each(function(){$(this).find("li").on("click tap",function(){$(this).parent().find("li[aria-selected]").removeAttr("aria-selected"),$(this).attr("aria-selected","true")}),$(this).find("button").last().on("click tap",function(a){a.preventDefault();var b=$(this).parents("form").attr("id");$(this).parents("form").find("h1").each(function(a){if(a>0){var c=$(this).html().toLowerCase(),d=$(this).parent().find("ol:nth-of-type("+a+") li[aria-selected] span").html();"file name"!==c&&"file"!==c&&(d=d.toLowerCase()),window[b][c]=d}}),$(this).parents("form").addClass("hidden"),window[b]()}),$(this).find("button").first().on("click tap",function(a){a.preventDefault(),$(this).parents("form").addClass("hidden")})});var d=$('button[id^="set"]');d.each(function(){var a=/set(.*)/.exec($(this).attr("id"))[1];return"color"==a||"bg"==a?$(this).on("click tap",function(){$(".picker").removeClass("hidden"),$(".picker").attr("data-caller",a),setTimeout(function(){$("body").on("click tap","canvas, #menu, header",function(){$(".picker").addClass("hidden"),$("body").off("click tap")})},500)}):void $(this).on("click tap",function(b){b.preventDefault(),$('form[id="'+a+'"]').removeClass("hidden")})});var e;$('div[role="slider"] button').on("mousedown touchstart",function(){$(this).attr("data-moving","true"),e||(e=$('div[role="slider"] button').offset().left)}).on("mousemove touchmove",function(a){if($(this).attr("data-moving")){a.changedTouches&&(a=a.changedTouches[0]);var b=parseInt(a.pageX-e-15),c=$("."+$(this).parents('div[role="slider"]').attr("class")),d=c.find("progress"),f=+d.attr("max"),g=+d.attr("min");if(f>=b&&b>=g){c.find("button").css("left",b+"%"),d.attr("value",b);var h=c.attr("class");settings[h]=b,$("#"+h+" span").html(b)}}}).on("mouseup mouseleave touchend",function(){$(this).removeAttr("data-moving")}),$(".fill, .stroke").on("click tap",function(){var a=$("."+$(this).attr("class")).find("span");"Yes"==a.html()?(a.html("No"),settings[$(this).attr("class")]=!1):(a.html("Yes"),settings[$(this).attr("class")]=!0)}),$(".close, .tour button").on("click tap",function(){$(this).parent().addClass("hidden"),$("body").off("click tap")}),$("#clear").on("click tap",function(){c.clear();var a=window.points.history;window.points=[],window.points.history=a,window.points.history.lasta?d%Mgv%okHodz%0#T3&6;M+GRD6O2YKpQf7g$(!VRv~Og**jc zxat|R%ttdaqh>mzTh>UErHJEXL-q&3WHw_~<0Lf-=A-WKoYjV!X=l#;{2t%?JHLDG zxo5YI=pR4OPsmuR@fxp!U-|Z~36h{(Vq<+9GCqfziKBl$nvVOI##Eq=|~3u}IoGVxL-xQ0)QnN66eiAZ}!m)$faoS(!t} z#4{|i=9IV&9>9I(7xA0`M#UXb!^%_*i@$0hV!9^=ATa74ifv4zc_NOm)FU-I%)|!~ zYGxlj#AlaDwe9v&SJ?~Y<5UiW0@=&Eq2*hP%FtbW{1-eBc)ZKAZnVtt{`__ zJycJkCp++II@p2zXnrS7V3sux>9tOLjUL*Hce+bj2Nt{1?FIFEeWG9$9CQMA?#w2tXudB+hx){EafpxHX-b7FIz)yF(ZCG@qz73 zr2?X(#ysK=PIVrEk|c-=(Ofl5Pg2GUgpyqAsw0_Pq5q=3W&hYLt5 zaJEd+fDJNXbuP-hzE2@p4)F~ho+u=*fPbfuECD7KakdnZWbk{7$YP*xF_{O<^l+z# zUlntmui29~lLXLpn#l^_cV?0WoKZqDflVd6uf7tJ0lu!3WCIqE-8-d@J_m&&+4*vj>GE7$j0xo(P$ybkx*+sInrw>Gi?IIEnj2JR>)>w$O5 zxh}netO5T>1+VjzT;OCU@5|xjb*?&jU*VNp-&o1l z>kAKY72h`LRs6koczDGV_pavol^%9^*zaLL4Vm??1BR}xAyenVq503JrczCSzuafP z(>t-M#1Si3DW97oro@r4R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