cartodb/lib/assets/javascripts/deep-insights/viewport-utils.js

21 lines
359 B
JavaScript
Raw Normal View History

2020-06-15 10:58:47 +08:00
var $ = require('jquery');
var TABLET_WIDTH = 760;
var MOBILE_WIDTH = 480;
var utils = {};
utils._isViewport = function (vp) {
return $(window).width() < vp;
};
utils.isMobileViewport = function () {
return this._isViewport(MOBILE_WIDTH);
};
utils.isTabletViewport = function () {
return this._isViewport(TABLET_WIDTH);
};
module.exports = utils;