strict mode: variable declarations where missing
This commit is contained in:
parent
5e6a4e46c5
commit
1f77e0c944
23 changed files with 77 additions and 78 deletions
|
|
@ -27,7 +27,7 @@ module.exports = {
|
|||
|
||||
stateGet: function (){
|
||||
var data = []
|
||||
for (i in widgetManager.widgets) {
|
||||
for (let i in widgetManager.widgets) {
|
||||
var widget = widgetManager.widgets[i]
|
||||
if (widget.setValue && widget.getValue) {
|
||||
var v = widget.getValue()
|
||||
|
|
@ -62,7 +62,7 @@ module.exports = {
|
|||
|
||||
stateSet: function(preset,send){
|
||||
|
||||
for (i in preset) {
|
||||
for (let i in preset) {
|
||||
var data = preset[i],
|
||||
widgets = widgetManager.getWidgetById(data[0])
|
||||
if (widgets.length) {
|
||||
|
|
@ -117,14 +117,14 @@ module.exports = {
|
|||
},
|
||||
|
||||
editorEnable: function(){
|
||||
GRIDWIDTH = getComputedStyle(document.documentElement).getPropertyValue("--grid-width")
|
||||
window.GRIDWIDTH = getComputedStyle(document.documentElement).getPropertyValue("--grid-width")
|
||||
$('.editor-root').attr('data-tab','#container').removeClass('disabled')
|
||||
$('.enable-editor').addClass('on')
|
||||
$('.disable-editor').removeClass('on')
|
||||
$('body').addClass('editor-enabled')
|
||||
.toggleClass('no-grid', GRIDWIDTH==1)
|
||||
|
||||
EDITING = true
|
||||
window.EDITING = true
|
||||
|
||||
|
||||
var f = $('<div class="form" id="grid-width-input"></div>'),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ var callbacks = module.exports = {
|
|||
},
|
||||
|
||||
connected:function(){
|
||||
LOADING.close()
|
||||
window.LOADING.close()
|
||||
},
|
||||
|
||||
stateLoad: function(data){
|
||||
|
|
@ -34,7 +34,7 @@ var callbacks = module.exports = {
|
|||
list = lobby.find('.list'),
|
||||
footer = lobby.find('.footer')
|
||||
|
||||
for (i in data) {
|
||||
for (let i in data) {
|
||||
|
||||
var max = 50
|
||||
var path = data[i],
|
||||
|
|
@ -130,7 +130,7 @@ var callbacks = module.exports = {
|
|||
css = data.join('')
|
||||
style.innerHTML = css
|
||||
document.body.appendChild(style)
|
||||
GRIDWIDTH = getComputedStyle(document.documentElement).getPropertyValue("--grid-width")
|
||||
window.GRIDWIDTH = getComputedStyle(document.documentElement).getPropertyValue("--grid-width")
|
||||
if (css.indexOf('--pixel-scale') != -1) {
|
||||
PXSCALE_RESET()
|
||||
}
|
||||
|
|
@ -158,6 +158,6 @@ var bindCallback = function(i) {
|
|||
})
|
||||
}
|
||||
|
||||
for (i in callbacks) {
|
||||
for (let i in callbacks) {
|
||||
bindCallback(i)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ var menu = function(e,actions,parent){
|
|||
m.css({top:e.pageY+'px',left:e.pageX+'px'})
|
||||
}
|
||||
|
||||
for (label in actions) {
|
||||
for (let label in actions) {
|
||||
|
||||
if (typeof actions[label] == 'object') {
|
||||
|
||||
|
|
|
|||
|
|
@ -171,13 +171,13 @@ var incrementWidget = function(data, root){
|
|||
}
|
||||
|
||||
if (data.widgets && data.widgets.length) {
|
||||
for (i in data.widgets) {
|
||||
for (let i in data.widgets) {
|
||||
data.widgets[i] = incrementWidget(data.widgets[i], false)
|
||||
}
|
||||
}
|
||||
|
||||
if (data.tabs && data.tabs.length) {
|
||||
for (i in data.tabs) {
|
||||
for (let i in data.tabs) {
|
||||
data.tabs[i] = incrementWidget(data.tabs[i], false)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ var editObject = function(container, data, refresh){
|
|||
|
||||
$(`<div class="separator"><span>${isWidget?'Widget':'Tab'}</span></div>`).appendTo(form)
|
||||
|
||||
for (i in params) {
|
||||
for (var i in params) {
|
||||
|
||||
if (i.indexOf('_')==0) {
|
||||
$(`<div class="separator"><span>${params[i]}</span></div>`).appendTo(form)
|
||||
|
|
@ -56,10 +56,10 @@ var editObject = function(container, data, refresh){
|
|||
|
||||
input = $(`<select class="input" data-type="${type}" title="${i}"/>`)
|
||||
|
||||
for (t in widgetOptions) {
|
||||
for (let t in widgetOptions) {
|
||||
input.append(`<option ${t==value?'selected=':''} value="${t}">${t}</option>`)
|
||||
}
|
||||
select = $('<div class="select-wrapper"></div>').append(input)
|
||||
let select = $('<div class="select-wrapper"></div>').append(input)
|
||||
select.appendTo(wrapper)
|
||||
|
||||
} else if (typeof params[i]=='boolean') {
|
||||
|
|
@ -130,7 +130,7 @@ var editObject = function(container, data, refresh){
|
|||
}
|
||||
}
|
||||
|
||||
for (i in data.widgets) {
|
||||
for (var i in data.widgets) {
|
||||
|
||||
|
||||
var item = $(`<li data-index="${i}" class="sortables" data-id="${data.widgets[i].id}"><a class="btn small">${data.widgets[i].id||data.widgets[i].label}</a></li>`)
|
||||
|
|
@ -187,7 +187,7 @@ var editObject = function(container, data, refresh){
|
|||
}
|
||||
}
|
||||
|
||||
for (i in data.tabs) {
|
||||
for (var i in data.tabs) {
|
||||
var item = $(`<li data-index="${i}" class="sortables"><a class="btn small">${data.tabs[i].label}</a></li>`)
|
||||
.appendTo(list)
|
||||
.click(editItem(i))
|
||||
|
|
@ -293,7 +293,7 @@ var editSession = function(container,data,refresh){
|
|||
}
|
||||
}
|
||||
|
||||
for (i in data) {
|
||||
for (var i in data) {
|
||||
var item = $(`<li data-index="${i}" class="sortables"><a class="btn small">${data[i].label}</a></li>`)
|
||||
.appendTo(list)
|
||||
.click(editItem(i))
|
||||
|
|
|
|||
|
|
@ -103,9 +103,9 @@ var init = function(){
|
|||
}
|
||||
|
||||
actions['<i class="fa fa-plus"></i> Add widget'] = {}
|
||||
for (category in widgetCategories) {
|
||||
for (let category in widgetCategories) {
|
||||
actions['<i class="fa fa-plus"></i> Add widget'][category] = {}
|
||||
for (t in widgetCategories[category]) {
|
||||
for (let t in widgetCategories[category]) {
|
||||
let wtype = widgetCategories[category][t]
|
||||
actions['<i class="fa fa-plus"></i> Add widget'][category][wtype] = function(){
|
||||
data.widgets = data.widgets || []
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ module.exports = function(purgetabs) {
|
|||
|
||||
// get all buffered tabs
|
||||
formerBuffuredTabs = []
|
||||
for (i in TABS) {
|
||||
for (let i in TABS) {
|
||||
formerBuffuredTabs.push(TABS[i].tab[0])
|
||||
}
|
||||
|
||||
// remove deleted tabs that are not referenced (have no navigation link pointing to them)
|
||||
var $f = $(formerBuffuredTabs)
|
||||
for (i in TABS) {
|
||||
for (let i in TABS) {
|
||||
if (!($f.find(`[data-tab="${i}"]`).length || i== '#container')) {
|
||||
delete TABS[i]
|
||||
}
|
||||
|
|
@ -32,14 +32,14 @@ module.exports = function(purgetabs) {
|
|||
|
||||
|
||||
bufferedTabs = []
|
||||
for (i in TABS) {
|
||||
for (let i in TABS) {
|
||||
bufferedTabs.push(TABS[i].tab[0])
|
||||
}
|
||||
|
||||
// prune widget stores
|
||||
// if widgets cannot be found in buffered tabs, it must be unreferenced
|
||||
var $b = $(bufferedTabs)
|
||||
for (hash in widgetManager.widgets) {
|
||||
for (let hash in widgetManager.widgets) {
|
||||
if (!$b.find(widgetManager.widgets[hash].widget).length) {
|
||||
widgetManager.removeWidget(hash)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ var WidgetManager = function(){
|
|||
// without sending any extra osc message
|
||||
if (widgetsById.length>1) {
|
||||
var v = widget.abstract.getValue()
|
||||
for (i in widgetsById) {
|
||||
for (let i in widgetsById) {
|
||||
if (!widgetsById[i].widget.is(widget) && widgetsById[i].setValue) {
|
||||
widgetsById[i].setValue(v,{send:false,sync:false})
|
||||
}
|
||||
|
|
@ -32,7 +32,7 @@ var WidgetManager = function(){
|
|||
// Updated widgets will send osc messages normally
|
||||
if (widgetsByLinkId.length>1) {
|
||||
var v = widget.abstract.getValue()
|
||||
for (i in widgetsByLinkId) {
|
||||
for (let i in widgetsByLinkId) {
|
||||
if (!widgetsByLinkId[i].widget.is(widget) && widgetsByLinkId[i].setValue) {
|
||||
widgetsByLinkId[i].setValue(v,{send:options.send,sync:false})
|
||||
}
|
||||
|
|
@ -129,9 +129,9 @@ WidgetManager.prototype.removeWidget = function(hash) {
|
|||
|
||||
WidgetManager.prototype.purge = function() {
|
||||
|
||||
for (route of [this.addressRoute, this.idRoute, this.linkIdRoute]) {
|
||||
for (key in route) {
|
||||
for (i=route[key].length-1; i>=0; i--) {
|
||||
for (let route of [this.addressRoute, this.idRoute, this.linkIdRoute]) {
|
||||
for (let key in route) {
|
||||
for (let i=route[key].length-1; i>=0; i--) {
|
||||
let hash = route[key][i]
|
||||
if (!this.widgets[hash]) {
|
||||
route[key].splice(i, 1)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ Osc.prototype.receive = function(data){
|
|||
|
||||
let widget = widgetManager.getWidgetByAddress(addressref)
|
||||
|
||||
for (i in widget) {
|
||||
for (let i in widget) {
|
||||
// if the message target is provided (when message comes from another client connected to the same server)
|
||||
// then we only update the widgets that have the same target
|
||||
// compare arrays using > and < operators (both false = equality)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ module.exports.tabs = function(data,parent,main,parentLabel){
|
|||
if (main) {
|
||||
// Reset Globals
|
||||
SESSION = data
|
||||
for (i in TABS) {
|
||||
for (let i in TABS) {
|
||||
if (i!='#container') {
|
||||
TABS[i].parent.remove()
|
||||
TABS[i].tab.remove()
|
||||
|
|
@ -56,7 +56,7 @@ module.exports.tabs = function(data,parent,main,parentLabel){
|
|||
content = $(document.createElement('div')).addClass('content')
|
||||
|
||||
|
||||
for (i in data) {
|
||||
for (let i in data) {
|
||||
var tabData = data[i]
|
||||
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ module.exports.tabs = function(data,parent,main,parentLabel){
|
|||
|
||||
module.exports.widgets = function(data,parent) {
|
||||
|
||||
for (i in data) {
|
||||
for (let i in data) {
|
||||
var widgetData = data[i]
|
||||
|
||||
// Set default widget type
|
||||
|
|
@ -111,7 +111,7 @@ module.exports.widgets = function(data,parent) {
|
|||
var tmpWidgetOptions = JSON.parse(JSON.stringify(widgetOptions))
|
||||
|
||||
// Set widget's undefined options to default
|
||||
for (i in tmpWidgetOptions[widgetData.type]) {
|
||||
for (let i in tmpWidgetOptions[widgetData.type]) {
|
||||
if (i.indexOf('_')!=0 && widgetData[i]===undefined) widgetData[i] = tmpWidgetOptions[widgetData.type][i]
|
||||
}
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ module.exports.widgets = function(data,parent) {
|
|||
widgetData.address = widgetData.address=='auto'?'/' + widgetData.id:widgetData.address
|
||||
|
||||
// Delete unrecognized options
|
||||
for (i in widgetData) {
|
||||
for (let i in widgetData) {
|
||||
if (widgetOptions[widgetData.type][i]===undefined && i!='type') {delete widgetData[i]}
|
||||
}
|
||||
|
||||
|
|
@ -155,7 +155,7 @@ module.exports.widgets = function(data,parent) {
|
|||
}
|
||||
|
||||
// dimensions / coordinates can't be < 0
|
||||
for (t in {width:'',height:'',top:'',left:''}) {
|
||||
for (let t in {width:'',height:'',top:'',left:''}) {
|
||||
widgetData[t] = `${widgetData[t]}`.indexOf('-')!=-1?0:widgetData[t]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ var callbacks = {
|
|||
}
|
||||
},
|
||||
'/TABS': function(args) {
|
||||
for (i in args) {
|
||||
for (let i in args) {
|
||||
$(`[data-id="${args[i]}"]`).trigger('fake-click')
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ var sidepanel = function(data){
|
|||
|
||||
var html = $('<ul id="options"></ul>')
|
||||
|
||||
for (i in data) {
|
||||
for (let i in data) {
|
||||
var itemData = data[i]
|
||||
|
||||
var item = $('<li></li>'),
|
||||
|
|
@ -100,7 +100,7 @@ var sidepanel = function(data){
|
|||
if (itemData.title) $('<div class="title">'+itemData.title+'</div>').prependTo(wrapper)
|
||||
if (itemData.class) inner.attr('class',itemData.class)
|
||||
|
||||
for (j in itemData.actions) {
|
||||
for (let j in itemData.actions) {
|
||||
var actionData = itemData.actions[j]
|
||||
var el = $('<a class="btn">'+actionData.title+'</a>').appendTo(wrapper)
|
||||
if (actionData.action) bindAction(el, actionData.action)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ module.exports.categories = {
|
|||
|
||||
module.exports.widgetOptions = function(){
|
||||
var r = {}
|
||||
for (i in widgets) {
|
||||
for (let i in widgets) {
|
||||
r[i] = widgets[i].options()
|
||||
}
|
||||
return r
|
||||
|
|
@ -63,7 +63,7 @@ module.exports.widgetOptions = function(){
|
|||
|
||||
module.exports.createWidget = function(){
|
||||
var r = {}
|
||||
for (i in widgets) {
|
||||
for (let i in widgets) {
|
||||
let x = i,
|
||||
f = function(){
|
||||
return new widgets[x](...arguments)
|
||||
|
|
|
|||
|
|
@ -78,14 +78,14 @@ module.exports = class _canvas_base extends _widgets_base {
|
|||
}
|
||||
|
||||
if (typeof this.clearRect[0] == 'object') {
|
||||
for (i in this.clearRect) {
|
||||
for (let i in this.clearRect) {
|
||||
this.ctx.clearRect(...this.clearRect[i])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
this.ctx.clearRect(...this.clearRect)
|
||||
|
||||
|
||||
}
|
||||
|
||||
draw(){
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ module.exports = class _widgets_base {
|
|||
|
||||
if (typeof obj === 'object') {
|
||||
copy = Array.isArray(obj) ? [] : {}
|
||||
for (key in obj) {
|
||||
for (let key in obj) {
|
||||
copy[key] = _widgets_base.deepCopy(obj[key])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ module.exports = class Formula extends _widgets_base {
|
|||
var variables = {},
|
||||
id
|
||||
|
||||
for (id of this.linkedWidgets) {
|
||||
for (let id of this.linkedWidgets) {
|
||||
if (id !== undefined) {
|
||||
variables['_'+id] = widgetManager.getWidgetById(id)[0].getValue()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ module.exports = class Rgb extends _pads_base {
|
|||
|
||||
if (!v || !v.length || v.length!=3) return
|
||||
|
||||
for (i in [0,1,2]) {
|
||||
for (let i in [0,1,2]) {
|
||||
v[i] = clip(v[i],[0,255])
|
||||
}
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ module.exports = class Rgb extends _pads_base {
|
|||
this.faders.h.setValue(this.hsb.h, {sync: false, send:false, dragged:false})
|
||||
}
|
||||
|
||||
for (i in this.inputs) [
|
||||
for (let i in this.inputs) [
|
||||
this.inputs[i].val(this.value[i].toFixed(this.widgetData.precision))
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ module.exports = class _plots_base extends _canvas_base {
|
|||
|
||||
var first = true
|
||||
var point = []
|
||||
for (i in this.data) {
|
||||
for (let i in this.data) {
|
||||
|
||||
if (this.data[i][1]>this.rangeY.max || this.data[i][1]<this.rangeY.min ||
|
||||
this.data[i][0]>this.rangeX.max || this.data[i][0]<this.rangeX.min) continue
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ module.exports = class Eq extends _plots_base {
|
|||
|
||||
widgetData.resolution = clip(widgetData.resolution,[64,1024])
|
||||
|
||||
for (i in widgetData.filters) {
|
||||
for (let i in widgetData.filters) {
|
||||
|
||||
for (j in widgetData.filters[i]) {
|
||||
for (let j in widgetData.filters[i]) {
|
||||
if (typeof widgetData.filters[i][j]=='string' && !(j=='type' && widgetData.filters[i][j].match(/peak|notch|highpass|highshelf|lowpass|lowshelf/))) {
|
||||
this.linkedWidgets.push(widgetData.filters[i][j])
|
||||
}
|
||||
|
|
@ -66,12 +66,12 @@ module.exports = class Eq extends _plots_base {
|
|||
eqResponse = []
|
||||
|
||||
|
||||
for (i in this.widgetData.filters) {
|
||||
for (let i in this.widgetData.filters) {
|
||||
var filter = this.widgetData.filters[i]
|
||||
|
||||
filters[i] = {}
|
||||
|
||||
for (j in filter) {
|
||||
for (let j in filter) {
|
||||
let widget = widgetManager.getWidgetById(filter[j])
|
||||
|
||||
if (typeof filter[j]=='string' && widget.length) {
|
||||
|
|
@ -88,7 +88,7 @@ module.exports = class Eq extends _plots_base {
|
|||
|
||||
}
|
||||
|
||||
for (i in filters) {
|
||||
for (let i in filters) {
|
||||
|
||||
var filterResponse
|
||||
|
||||
|
|
|
|||
|
|
@ -48,8 +48,8 @@ module.exports = class Plot extends _plots_base {
|
|||
|
||||
} else if (typeof widgetData.points=='object') {
|
||||
|
||||
for (i in widgetData.points) {
|
||||
for (j in widgetData.points[i]) {
|
||||
for (let i in widgetData.points) {
|
||||
for (let j in widgetData.points[i]) {
|
||||
if (typeof widgetData.points[i][j] == 'string') {
|
||||
this.linkedWidgets.push(widgetData.points[i][j])
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ module.exports = class Plot extends _plots_base {
|
|||
|
||||
} else if (typeof points=='object') {
|
||||
|
||||
for (i in points) {
|
||||
for (let i in points) {
|
||||
|
||||
data[i] = []
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ module.exports = class Led extends _widgets_base {
|
|||
|
||||
if (!v || !v.length || v.length<3) return
|
||||
|
||||
for (i in [0,1,2]) {
|
||||
for (let i in [0,1,2]) {
|
||||
v[i] = parseInt(clip(v[i],[0,255]))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,36 +1,36 @@
|
|||
ARGV={};location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){ARGV[k]=v})
|
||||
window.ARGV={};location.search.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){ARGV[k]=v})
|
||||
|
||||
///////////////////////
|
||||
|
||||
PACKAGE = require('../../../app/package.json')
|
||||
window.PACKAGE = require('../../../app/package.json')
|
||||
|
||||
///////////////////////
|
||||
|
||||
SESSION = []
|
||||
STATE = []
|
||||
window.SESSION = []
|
||||
window.STATE = []
|
||||
|
||||
CLIPBOARD = null
|
||||
EDITING = false
|
||||
READ_ONLY = false
|
||||
window.CLIPBOARD = null
|
||||
window.EDITING = false
|
||||
window.READ_ONLY = false
|
||||
|
||||
|
||||
TABS = {}
|
||||
window.TABS = {}
|
||||
|
||||
|
||||
PXSCALE = 1
|
||||
INITIALZOOM = 1
|
||||
PXSCALE_RESET = ()=>{
|
||||
window.PXSCALE = 1
|
||||
window.INITIALZOOM = 1
|
||||
window.PXSCALE_RESET = ()=>{
|
||||
PXSCALE = getComputedStyle(document.documentElement).getPropertyValue("--pixel-scale")
|
||||
document.documentElement.style.setProperty("--pixel-scale", PXSCALE)
|
||||
INITIALZOOM = PXSCALE
|
||||
}
|
||||
PXSCALE_RESET()
|
||||
|
||||
CANVAS_SCALING = ARGV.hdpi ? window.devicePixelRatio : 1
|
||||
window.CANVAS_SCALING = ARGV.hdpi ? window.devicePixelRatio : 1
|
||||
|
||||
///////////////////////
|
||||
|
||||
sourceMap = require('./libs/source-map.min.js')
|
||||
window.sourceMap = require('./libs/source-map.min.js')
|
||||
|
||||
var request = new XMLHttpRequest()
|
||||
|
||||
|
|
@ -52,7 +52,7 @@ request.send()
|
|||
|
||||
///////////////////////
|
||||
|
||||
$ = jQuery = require('./libs/jquery.min')
|
||||
window.$ = window.jQuery = require('./libs/jquery.min')
|
||||
require('./libs/jquery.ui')
|
||||
require('./libs/jquery.drag')
|
||||
require('./libs/jquery.resize')
|
||||
|
|
@ -69,6 +69,6 @@ osc.init()
|
|||
|
||||
///////////////////////
|
||||
$(document).ready(function(){
|
||||
LOADING = require('./app/utils').loading('Connecting server...')
|
||||
window.LOADING = require('./app/utils').loading('Connecting server...')
|
||||
ipc.send('ready')
|
||||
})
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@
|
|||
// ignore mouse event when fired by a simulated touch event
|
||||
if ((e.originalEvent.sourceCapabilities && e.originalEvent.sourceCapabilities.firesTouchEvents) || e.button == 2) return
|
||||
|
||||
isPointerDown = true
|
||||
target = $this
|
||||
previousEvent = e
|
||||
|
||||
|
|
@ -93,7 +92,7 @@
|
|||
|
||||
|
||||
target.trigger('dragend',[e,e.originalEvent.traversing])
|
||||
isPointerDown = false
|
||||
|
||||
$document.off(events.mouse.move,mouseMoveHandler)
|
||||
$document.off(events.mouse.stop,mouseStopHandler)
|
||||
$document.off(events.mouse.out,mouseOutHandler)
|
||||
|
|
@ -129,14 +128,14 @@
|
|||
|
||||
var oE = e.originalEvent
|
||||
|
||||
for (i in oE.changedTouches) {
|
||||
for (let i in oE.changedTouches) {
|
||||
if (isNaN(i) || !oE.changedTouches[i]) continue
|
||||
|
||||
var touch = oE.changedTouches[i],
|
||||
id = touch.identifier,
|
||||
emit = true
|
||||
|
||||
for (j in targets) {
|
||||
for (let j in targets) {
|
||||
if (targets[j][0].isSameNode(touch.target)) {
|
||||
emit = false
|
||||
break
|
||||
|
|
@ -172,11 +171,11 @@
|
|||
|
||||
var oE = e.originalEvent
|
||||
|
||||
for (i in oE.changedTouches) {
|
||||
for (let i in oE.changedTouches) {
|
||||
if (isNaN(i) || !oE.changedTouches[i]) continue
|
||||
|
||||
var nFingers = 0
|
||||
for (j in oE.touches) {
|
||||
for (let j in oE.touches) {
|
||||
if (oE.touches[j].target && oE.touches[j].target.isSameNode(oE.changedTouches[i].target)) {
|
||||
nFingers += 1
|
||||
}
|
||||
|
|
@ -228,7 +227,7 @@
|
|||
|
||||
var oE = e.originalEvent
|
||||
|
||||
for (i in oE.changedTouches) {
|
||||
for (let i in oE.changedTouches) {
|
||||
|
||||
if (isNaN(i) || !oE.changedTouches[i]) continue
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue