make in/out markers on timeline display correctly
This commit is contained in:
parent
8349b50536
commit
049c0be790
2 changed files with 21 additions and 23 deletions
|
@ -159,27 +159,33 @@ Ox.each = function(obj, fn) {
|
||||||
return obj;
|
return obj;
|
||||||
};
|
};
|
||||||
|
|
||||||
Ox.equals = function() { // unused
|
Ox.equals = function(obj0, obj1) {
|
||||||
/*
|
/*
|
||||||
... core? type?
|
... core? type?
|
||||||
*/
|
*/
|
||||||
var ret = false;
|
var ret = false;
|
||||||
if (obj0.length == obj1.length) {
|
if (obj0 === obj1) {
|
||||||
Ox.each(obj0, function(k, v) {
|
ret = true;
|
||||||
if (Ox.isObject(v)) {
|
} else if (typeof(obj0) == typeof(obj1)) {
|
||||||
|
if (obj0 == obj1) {
|
||||||
} else {
|
ret = true;
|
||||||
|
} else if (Ox.isArray(obj0) && obj0.length == obj1.length) {
|
||||||
}
|
Ox.each(obj0, function(i, v) {
|
||||||
return ret;
|
ret = v == obj1[i];
|
||||||
});
|
return ret;
|
||||||
|
});
|
||||||
|
} else if (Ox.isObject(obj0)) {
|
||||||
|
ret = Ox.equals(Ox.keys(obj0), Ox.keys(obj1)) &&
|
||||||
|
Ox.equals(Ox.values(obj0), Ox.values(obj1));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Ox.print('Ox.equals', obj0, obj1, ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ox.every = function(obj, fn) {
|
Ox.every = function(obj, fn) {
|
||||||
/*
|
/*
|
||||||
Ox.every() forks for arrays, objects and strings, unlike [].every()
|
Ox.every() works for arrays, objects and strings, unlike [].every()
|
||||||
>>> Ox.every([0, 1, 2], function(v, i) { return i == v; })
|
>>> Ox.every([0, 1, 2], function(v, i) { return i == v; })
|
||||||
true
|
true
|
||||||
>>> Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; })
|
>>> Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; })
|
||||||
|
|
|
@ -1051,18 +1051,7 @@ requires
|
||||||
self.options = $.extend(self.options || self.defaults, args);
|
self.options = $.extend(self.options || self.defaults, args);
|
||||||
$.each(args, function(key, value) {
|
$.each(args, function(key, value) {
|
||||||
// key == 'id' && id && Ox.Event.changeId(id, value);
|
// key == 'id' && id && Ox.Event.changeId(id, value);
|
||||||
value !== oldOptions[key] && self.onChange(key, value);
|
/*!Ox.equals(value, oldOptions[key]) &&*/ self.onChange(key, value);
|
||||||
/*
|
|
||||||
fixme: why does this not work?
|
|
||||||
Ox.print('options', options, key, value)
|
|
||||||
//Ox.print(!options, !options || !options[key], !options || !options[key] || options[key] !== value)
|
|
||||||
if (!options || !options[key] || options[key] !== value) {
|
|
||||||
Ox.print('onChange...')
|
|
||||||
self.onChange(key, value);
|
|
||||||
} else {
|
|
||||||
Ox.print('NO CHANGE');
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
ret = that;
|
ret = that;
|
||||||
}
|
}
|
||||||
|
@ -9801,7 +9790,9 @@ requires
|
||||||
}
|
}
|
||||||
|
|
||||||
self.onChange = function(key, value) {
|
self.onChange = function(key, value) {
|
||||||
|
Ox.print('onChange:', key, value)
|
||||||
if (key == 'points') {
|
if (key == 'points') {
|
||||||
|
Ox.print('key', key, 'value', value)
|
||||||
setMarkerPoint(0);
|
setMarkerPoint(0);
|
||||||
setMarkerPoint(1);
|
setMarkerPoint(1);
|
||||||
} else if (key == 'position') {
|
} else if (key == 'position') {
|
||||||
|
@ -10182,6 +10173,7 @@ requires
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$.each(self.$timeline, function(i, v) {
|
$.each(self.$timeline, function(i, v) {
|
||||||
|
Ox.print('points:', self.options.points)
|
||||||
v.options({
|
v.options({
|
||||||
points: self.options.points
|
points: self.options.points
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue