Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/core/behavior-device.js
Show All 37 Lines | recalculate: function() { | ||||
if (screen_width) { | if (screen_width) { | ||||
v.x = Math.min(v.x, screen_width); | v.x = Math.min(v.x, screen_width); | ||||
} | } | ||||
var device = 'desktop'; | var device = 'desktop'; | ||||
if (v.x <= self._tabletBreakpoint) { | if (v.x <= self._tabletBreakpoint) { | ||||
device = 'tablet'; | device = 'tablet'; | ||||
} | } | ||||
if (v.x <= 480) { | if (v.x <= 512) { | ||||
device = 'phone'; | device = 'phone'; | ||||
} | } | ||||
if (device == self._device) { | if (device == self._device) { | ||||
return; | return; | ||||
} | } | ||||
self._device = device; | self._device = device; | ||||
Show All 29 Lines |