summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 02:49:11 +0000
committerpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-29 02:49:11 +0000
commit32a4cef0e650b763c5828464dd2964d9cc74bb0c (patch)
tree2d5ab46331e3203eb4152dbf5bf8435032cc76fa /o3d
parent62572a430eaac2ea3ef2a83344a64fafcfd87d4c (diff)
downloadchromium_src-32a4cef0e650b763c5828464dd2964d9cc74bb0c.zip
chromium_src-32a4cef0e650b763c5828464dd2964d9cc74bb0c.tar.gz
chromium_src-32a4cef0e650b763c5828464dd2964d9cc74bb0c.tar.bz2
When the client is created, it sets a couple event callbacks to an empty function so that when you click and drag on the HTML canvas, it doesn't act like you're selecting text.
Review URL: http://codereview.chromium.org/3106029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/samples/o3djs/webgl.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/o3d/samples/o3djs/webgl.js b/o3d/samples/o3djs/webgl.js
index 3f15629..9494759 100644
--- a/o3d/samples/o3djs/webgl.js
+++ b/o3d/samples/o3djs/webgl.js
@@ -216,6 +216,14 @@ o3djs.webgl.createClient = function(element, opt_features, opt_debug) {
return null;
}
+ // This keeps the cursor from changing to an I-beam when the user clicks and
+ // drags. It's easier on the eyes.
+ function returnFalse() {
+ return false;
+ }
+ document.onselectstart = returnFalse;
+ document.onmousedown = returnFalse;
+
canvas.client = client;
canvas.o3d = o3d;