Merge pull request #77 from grotr/master

Add disableSelection to stop highlighting
This commit is contained in:
Michael Townsend
2014-04-02 18:55:35 -04:00
+15 -1
View File
@@ -86,6 +86,8 @@ var Engine = {
window.location = 'mobileWarning.html'; window.location = 'mobileWarning.html';
} }
Engine.disableSelection();
if(this.options.state != null) { if(this.options.state != null) {
window.State = this.options.state; window.State = this.options.state;
} else { } else {
@@ -248,6 +250,7 @@ var Engine = {
string64 = string64.replace(/\s/g, ''); string64 = string64.replace(/\s/g, '');
string64 = string64.replace(/\./g, ''); string64 = string64.replace(/\./g, '');
string64 = string64.replace(/\n/g, ''); string64 = string64.replace(/\n/g, '');
Engine.enableSelection();
Events.startEvent({ Events.startEvent({
title: 'Export', title: 'Export',
scenes: { scenes: {
@@ -257,7 +260,8 @@ var Engine = {
buttons: { buttons: {
'done': { 'done': {
text: 'got it', text: 'got it',
nextScene: 'end' nextScene: 'end',
onChoose: Engine.disableSelection
} }
} }
} }
@@ -566,6 +570,16 @@ var Engine = {
} }
}, },
disableSelection: function() {
document.onselectstart = function() {return false;} // this is for IE
document.onmousedown = function() {return false;} // this is for the rest
},
enableSelection: function() {
document.onselectstart = function() {return true;}
document.onmousedown = function() {return true;}
},
handleStateUpdates: function(e){ handleStateUpdates: function(e){
} }