make in/out markers on timeline display correctly

This commit is contained in:
rolux 2010-12-31 07:03:36 +00:00
parent 62416c0b0d
commit ccd6441316
2 changed files with 21 additions and 23 deletions

View File

@ -159,27 +159,33 @@ Ox.each = function(obj, fn) {
return obj;
};
Ox.equals = function() { // unused
Ox.equals = function(obj0, obj1) {
/*
... core? type?
*/
var ret = false;
if (obj0.length == obj1.length) {
Ox.each(obj0, function(k, v) {
if (Ox.isObject(v)) {
} else {
}
return ret;
});
if (obj0 === obj1) {
ret = true;
} else if (typeof(obj0) == typeof(obj1)) {
if (obj0 == obj1) {
ret = true;
} else if (Ox.isArray(obj0) && obj0.length == obj1.length) {
Ox.each(obj0, function(i, v) {
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;
}
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; })
true
>>> Ox.every({a: 1, b: 2, c: 3}, function(v) { return v == 1; })

View File

@ -1051,18 +1051,7 @@ requires
self.options = $.extend(self.options || self.defaults, args);
$.each(args, function(key, value) {
// key == 'id' && id && Ox.Event.changeId(id, value);
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');
}
*/
/*!Ox.equals(value, oldOptions[key]) &&*/ self.onChange(key, value);
});
ret = that;
}
@ -9801,7 +9790,9 @@ requires
}
self.onChange = function(key, value) {
Ox.print('onChange:', key, value)
if (key == 'points') {
Ox.print('key', key, 'value', value)
setMarkerPoint(0);
setMarkerPoint(1);
} else if (key == 'position') {
@ -10182,6 +10173,7 @@ requires
});
});
$.each(self.$timeline, function(i, v) {
Ox.print('points:', self.options.points)
v.options({
points: self.options.points
});