Commit b1d3b019 authored by carlosperate's avatar carlosperate

Uses closure to check for touchscreens and set the scrollbar thickness accordingly.

parent 69294d83
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
goog.provide('Blockly.Scrollbar'); goog.provide('Blockly.Scrollbar');
goog.provide('Blockly.ScrollbarPair'); goog.provide('Blockly.ScrollbarPair');
goog.require('goog.userAgent'); goog.require('goog.events');
/** /**
...@@ -179,7 +179,7 @@ Blockly.Scrollbar = function(workspace, horizontal, opt_pair) { ...@@ -179,7 +179,7 @@ Blockly.Scrollbar = function(workspace, horizontal, opt_pair) {
* Don't define if there is no document object (e.g. node.js). * Don't define if there is no document object (e.g. node.js).
*/ */
Blockly.Scrollbar.scrollbarThickness = 15; Blockly.Scrollbar.scrollbarThickness = 15;
if (goog.getObjectByName('document.documentElement.ontouchstart')) { if (goog.events.BrowserFeature.TOUCH_ENABLED) {
Blockly.Scrollbar.scrollbarThickness = 25; Blockly.Scrollbar.scrollbarThickness = 25;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment