From 0d1ae5574c309a17c947554c90505169bd48d99e Mon Sep 17 00:00:00 2001 From: Kirill Live Date: Mon, 15 Jul 2024 00:07:47 +0300 Subject: [PATCH] kirilllive --- .DS_Store | Bin 8196 -> 8196 bytes ascii_paint.html | 9 +++++---- examples/logo_a.txt | 22 ++++++++++++++++++++++ examples/lum.txt | 2 +- 4 files changed, 28 insertions(+), 5 deletions(-) mode change 100644 => 100755 ascii_paint.html create mode 100644 examples/logo_a.txt diff --git a/.DS_Store b/.DS_Store index 1bfcd7a1b0b986b056cf8b25c5ede7793e434805..c9aea3df5c5b0e6b5c4fa0b2873352e0a1d0bf2b 100644 GIT binary patch delta 57 scmZp1XmQwZLzu(Z!dOSa$i#H>1K~4_aNgtx!uFd#i|%Ac7ZGFv01*}v5dZ)H delta 57 scmZp1XmQwZLzu(J%s@xM$kJl-1K~4_aNgtx!uFd#i|%Ac7ZGFv01;mj7XSbN diff --git a/ascii_paint.html b/ascii_paint.html old mode 100644 new mode 100755 index 6f443af..7c759e2 --- a/ascii_paint.html +++ b/ascii_paint.html @@ -277,7 +277,7 @@ #boosty{fill:var(--tx);} - + @@ -536,13 +536,14 @@ context_menu.style.top=(e.clientY+asciiscreen.scrollTop-doc.top)/scale+"px"; } window.addEventListener('mousemove',function(e){if(tool==5){cursor_text.style.left=(e.clientX+16)+"px";cursor_text.style.top=(e.clientY+16)+"px";}}) -window.addEventListener('mousedown',function(){if(tool==0||tool==3||tool==5){mouseclick=true;};if(contextmenushow){contextmenushow=false;context_menu.style.visibility='hidden';mouseclick=false;}}) +window.addEventListener('mousedown',function(e){if(e.button==0){if(tool==0||tool==3||tool==5){mouseclick=true;};if(contextmenushow){contextmenushow=false;context_menu.style.visibility='hidden';mouseclick=false;}} }) window.addEventListener('mouseup',function(){mouseclick=false;cursor_text.style.display="none"}) window.addEventListener('keypress',function(e){var n=String.fromCharCode(e.charCode);brush=n;active_brush.innerHTML=brush;}) asciicanvas.addEventListener('mouseup',function(){if(tool!=2&&tool!=5){state_save()};}) var startmove_x=null,startmove_y=null,scroll_x=null,scroll_y=null; viewport.addEventListener('mousedown',function(e){ - if(tool==2){ + if(tool==2||e.button==1){ + if(e.button==1){e.preventDefault();} startmove_x=e.clientX;startmove_y=e.clientY;scroll_x=viewport.scrollTop;scroll_y=viewport.scrollLeft; viewport.onmousemove=function(e){viewport.scrollTop=scroll_x-(e.clientY-startmove_y);viewport.scrollLeft=scroll_y-(e.clientX-startmove_x);}; viewport.onmouseup=function (e){startmove_x=null;startmove_y=null;viewport.onmousemove=null;viewport.onmouseup=null;}; @@ -675,7 +676,7 @@ for(x=0;x