hexcraft
ARCHIVED - browser-based 3D hexagonal tile editor built with Three.js
git clone https://git.vogt.world/hexcraft.git
Log | Files | README.md | LICENSE
← All files
name: js/trippleclick.min.js
-rw-r--r--
603
1function RemoveDocumentClick(){if(!isMouseDown){document.onclick=null;return true}tcTimer=window.setTimeout(RemoveDocumentClick,1e3);return false}function clearHighlight(){if(window.getSelection){window.getSelection().removeAllRanges()}else{if(document.selection){document.selection.empty()}}}var tcTimer=0;var isMouseDown=false;document.onmousedown=function(){isMouseDown=true};document.onmouseup=function(){isMouseDown=false};document.ondblclick=function(t){clearHighlight();window.clearTimeout(tcTimer);document.onclick=function(){clearHighlight()};tcTimer=window.setTimeout(RemoveDocumentClick,1e3)}