cleanup, again

This commit is contained in:
rolux 2011-11-03 16:42:41 +01:00
parent 2809a5d06d
commit 094b1a59ec
34 changed files with 93 additions and 101 deletions

View file

@ -162,5 +162,5 @@ Ox.Progressbar = function(options, self) {
}; };
return that; return that;
}; };

View file

@ -126,7 +126,6 @@ Ox.Resizebar = function(options, self) {
? (self.isLeftOrTop ? 'n' : 's') ? (self.isLeftOrTop ? 'n' : 's')
: (self.isLeftOrTop ? 'w' : 'e'); : (self.isLeftOrTop ? 'w' : 'e');
} }
} }
return cursor + '-resize'; return cursor + '-resize';
} }
@ -172,7 +171,7 @@ Ox.Resizebar = function(options, self) {
size: self.isLeftOrTop size: self.isLeftOrTop
? self.options.elements[1][self.dimensions[1]]() ? self.options.elements[1][self.dimensions[1]]()
: self.options.size : self.options.size
}); });
} }
self.setOption = function(key, value) { self.setOption = function(key, value) {

View file

@ -507,7 +507,7 @@ Ox.Calendar = function(options, self) {
.css({ .css({
textAlign: 'center' textAlign: 'center'
}); });
self.$lines = []; self.$lines = [];
getLines(); getLines();
renderCalendar(); renderCalendar();
@ -713,10 +713,11 @@ Ox.Calendar = function(options, self) {
width = getPosition(event.endTime, zoom) - left; width = getPosition(event.endTime, zoom) - left;
} }
return Ox.Element() return Ox.Element()
.addClass('OxEvent' + .addClass(
(event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' ) + 'OxEvent'
(event.current ? ' OxCurrent' : '') + + (event.type ? ' Ox' + Ox.toTitleCase(event.type) : '' )
(event.id == self.options.selected ? ' OxSelected' : '') + (event.current ? ' OxCurrent' : '')
+ (event.id == self.options.selected ? ' OxSelected' : '')
) )
.css({ .css({
left: left + 'px', left: left + 'px',
@ -803,14 +804,14 @@ Ox.Calendar = function(options, self) {
}) })
.appendTo(self.$content); .appendTo(self.$content);
} }
self.lineEvents[line].push(event); self.lineEvents[line].push(event);
}); });
} }
function getMouseDate(e) { function getMouseDate(e) {
return new Date(+self.options.date + ( return new Date(+self.options.date + (
e.clientX - that.offset().left - self.options.width / 2 - 1 e.clientX - that.offset().left - self.options.width / 2 - 1
) * getSecondsPerPixel() * 1000); ) * getSecondsPerPixel() * 1000);
} }
function getOverlayWidths() { function getOverlayWidths() {
@ -830,9 +831,8 @@ Ox.Calendar = function(options, self) {
function getPosition(date, zoom) { function getPosition(date, zoom) {
return Math.round( return Math.round(
self.options.width / 2 + self.options.width / 2
(date - self.options.date) / 1000 * + (date - self.options.date) / 1000 * getPixelsPerSecond(zoom)
getPixelsPerSecond(zoom)
); );
} }

View file

@ -88,7 +88,7 @@ Ox.ListCalendar = function(options, self) {
if (!self.durationCache[key]) { if (!self.durationCache[key]) {
self.durationCache[key] = Ox.formatDateRangeDuration(data.start, data.end, true); self.durationCache[key] = Ox.formatDateRangeDuration(data.start, data.end, true);
} }
return self.durationCache[key]; return self.durationCache[key];
}, },
id: 'id', id: 'id',
map: function(value, data) { map: function(value, data) {

View file

@ -38,10 +38,10 @@ Ox.DocPage = function(options, self) {
var $elements = [$('<div>') var $elements = [$('<div>')
.css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'}) .css({paddingLeft: (level ? level * 32 - 16 : 0) + 'px'})
.html( .html(
'<code><b>' + (name || item.name) + '</b> ' + '<code><b>' + (name || item.name) + '</b> '
'&lt;' + item.types.join('&gt;</code> or <code>&lt;') + '&gt; </code>' + + '&lt;' + item.types.join('&gt;</code> or <code>&lt;') + '&gt; </code>'
(item['default'] ? '(default: <code>' + item['default'] + '</code>) ' : '') + + (item['default'] ? '(default: <code>' + item['default'] + '</code>) ' : '')
Ox.parseHTML(item.summary) + Ox.parseHTML(item.summary)
) )
]; ];
[ [
@ -112,11 +112,11 @@ Ox.DocPage = function(options, self) {
.addClass(className) .addClass(className)
.css({marginLeft: (level * 32 + 16) + 'px'}) .css({marginLeft: (level * 32 + 16) + 'px'})
.html( .html(
'<code><b>&gt;&nbsp;' + '<code><b>&gt;&nbsp;'
Ox.encodeHTML(example.statement) + Ox.encodeHTML(example.statement)
.replace(/ /g, '&nbsp;') .replace(/ /g, '&nbsp;')
.replace(/\n/g, '<br/>\n&nbsp;&nbsp;') + .replace(/\n/g, '<br/>\n&nbsp;&nbsp;')
'</b></code>' + '</b></code>'
) )
); );
example.result && $elements.push($('<div>') example.result && $elements.push($('<div>')
@ -124,7 +124,7 @@ Ox.DocPage = function(options, self) {
.css({marginLeft: (level * 32 + 16) + 'px'}) .css({marginLeft: (level * 32 + 16) + 'px'})
.html( .html(
'<code>' + Ox.encodeHTML(example.result) + '</code>' '<code>' + Ox.encodeHTML(example.result) + '</code>'
) )
) )
}); });
} else if (section == 'source') { } else if (section == 'source') {
@ -133,8 +133,8 @@ Ox.DocPage = function(options, self) {
.addClass(className) .addClass(className)
.css({marginLeft: 16 + 'px'}) .css({marginLeft: 16 + 'px'})
.html( .html(
'<code><b>' + self.options.item.file.replace(Ox.PATH, '') + '<code><b>' + self.options.item.file.replace(Ox.PATH, '')
'</b> line ' + self.options.item.line + '</code>' + '</b> line ' + self.options.item.line + '</code>'
) )
); );
$elements.push( $elements.push(

View file

@ -225,7 +225,7 @@ Ox.Element = function(options, self) {
} }
function mousemove(e) { function mousemove(e) {
e = extend(e); e = extend(e);
clearTimeout(dragTimeout); clearTimeout(dragTimeout);
dragTimeout = setTimeout(function() { dragTimeout = setTimeout(function() {
// mouse did not move for 250 ms, trigger dragpause // mouse did not move for 250 ms, trigger dragpause
that.triggerEvent('dragpause', e); that.triggerEvent('dragpause', e);

View file

@ -18,7 +18,7 @@ Ox.SyntaxHighlighter <function> Syntax Highlighter
Ox.SyntaxHighlighter = function(options, self) { Ox.SyntaxHighlighter = function(options, self) {
self = self || {}; self = self || {};
var that = Ox.Element({}, self) var that = Ox.Element({}, self)
.defaults({ .defaults({
lineLength: 0, lineLength: 0,
@ -40,8 +40,8 @@ Ox.SyntaxHighlighter = function(options, self) {
var $lineNumbers, $line, $source, width, var $lineNumbers, $line, $source, width,
lines, source = '', tokens, lines, source = '', tokens,
linebreak = ( linebreak = (
self.options.showLinebreaks ? self.options.showLinebreaks
'<span class="OxLinebreak">\u21A9</span>' : '' ? '<span class="OxLinebreak">\u21A9</span>' : ''
) + '<br/>', ) + '<br/>',
tab = ( tab = (
self.options.showTabs ? self.options.showTabs ?

View file

@ -247,7 +247,7 @@ Ox.URL = function(options) {
} }
if (state.sort && state.sort.length) { if (state.sort && state.sort.length) {
parts.push(constructSort(state.sort, state)); parts.push(constructSort(state.sort, state));
} }
if (state.find) { if (state.find) {
parts.push(constructFind(state.find)); parts.push(constructFind(state.find));
} }
@ -498,7 +498,7 @@ Ox.URL = function(options) {
!state.item ? 'list' : 'item' !state.item ? 'list' : 'item'
], function(view) { ], function(view) {
if (spanTypes[view] == spanType) { if (spanTypes[view] == spanType) {
state.view = view; state.view = view;
state.span = span; state.span = span;
parts.shift(); parts.shift();
return false; return false;
@ -675,5 +675,5 @@ Ox.URL = function(options) {
} }
return that; return that;
}; };

View file

@ -33,10 +33,10 @@ Ox.Checkbox = function(options, self) {
width: 'auto' width: 'auto'
}) })
.options(options || {}) .options(options || {})
.addClass('OxCheckbox' .addClass('OxCheckbox' + (
+ (self.options.overlap == 'none' ? '' : ' OxOverlap' self.options.overlap == 'none'
+ Ox.toTitleCase(self.options.overlap)) ? '' : ' OxOverlap' + Ox.toTitleCase(self.options.overlap)
) ))
.attr({ .attr({
disabled: self.options.disabled disabled: self.options.disabled
}); });

View file

@ -10,7 +10,6 @@ Ox.CheckboxGroup <f:Ox.Element> CheckboxGroup Object
min <n|1> integer min <n|1> integer
width <n> integer, width in px width <n> integer, width in px
self <o> shared private variable self <o> shared private variable
change <!> triggered when checked property changes change <!> triggered when checked property changes
passes {checked, id, title} passes {checked, id, title}
@*/ @*/

View file

@ -9,7 +9,7 @@ Ox.ColorPicker <f:Ox.Element> ColorPicker Element
id <s> element id id <s> element id
value <s|0, 0, 0> rgb value value <s|0, 0, 0> rgb value
self <o> Shared private variable self <o> Shared private variable
change <!> triggered on change of value change <!> triggered on change of value
@*/ @*/
Ox.ColorPicker = function(options, self) { Ox.ColorPicker = function(options, self) {

View file

@ -15,7 +15,7 @@ Ox.DateInput <f:Ox.Element> DateInput Element
weekday <n> width of weekday input element weekday <n> width of weekday input element
year <n> width of year input element year <n> width of year input element
self <o> Shared private variable self <o> Shared private variable
change <!> triggered on change of value change <!> triggered on change of value
@*/ @*/
Ox.DateInput = function(options, self) { Ox.DateInput = function(options, self) {

View file

@ -12,7 +12,7 @@ Ox.DateTimeInput <f:Ox.Element> DateTimeInput Element
value <d> defautls to now value <d> defautls to now
weekday <b|false> weekday weekday <b|false> weekday
self <o> Shared private variable self <o> Shared private variable
change <!> triggered on change of value change <!> triggered on change of value
@*/ @*/
Ox.DateTimeInput = function(options, self) { Ox.DateTimeInput = function(options, self) {

View file

@ -98,7 +98,6 @@ Ox.Editable = function(options, self) {
width: width /*+ Ox.UI.SCROLLBAR_SIZE*/ + 'px' width: width /*+ Ox.UI.SCROLLBAR_SIZE*/ + 'px'
}); });
} }
//self.$input.find('input').css({width: width + 2})
/* /*
that.triggerEvent('change', { that.triggerEvent('change', {
value: event.value value: event.value
@ -177,7 +176,7 @@ Ox.Editable = function(options, self) {
return self.options.type == 'input' return self.options.type == 'input'
? self.options.value.replace(/ /g, '&nbsp;') ? self.options.value.replace(/ /g, '&nbsp;')
: Ox.parseHTML(self.options.value || '&nbsp;') : Ox.parseHTML(self.options.value || '&nbsp;')
.replace(/<br\/?>$/, '<br/>&nbsp;'); .replace(/<br\/?>$/, '<br/>&nbsp;');
} }
function formatValue() { function formatValue() {

View file

@ -677,7 +677,7 @@ Ox.Filter = function(options, self) {
items: ['K', 'M', 'G', 'T'].map(function(prefix) { items: ['K', 'M', 'G', 'T'].map(function(prefix) {
return {id: prefix + title, title: prefix + title}; return {id: prefix + title, title: prefix + title};
}), }),
width: 48 width: 48
}) : Ox.Label({ }) : Ox.Label({
overlap: 'left', overlap: 'left',
textAlign: 'center', textAlign: 'center',

View file

@ -356,7 +356,7 @@ Ox.Input = function(options, self) {
} }
} }
newLength = newValue.length; newLength = newValue.length;
//Ox.print('selectEnd', selectEnd) //Ox.print('selectEnd', selectEnd)
if (self.options.autocompleteReplace) { if (self.options.autocompleteReplace) {
@ -484,8 +484,8 @@ Ox.Input = function(options, self) {
var cursor, var cursor,
length, length,
regexp = type == 'float' ? new RegExp( regexp = type == 'float' ? new RegExp(
'(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d' + '(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+\\.?\\d'
(self.options.decimals ? '{0,' + self.options.decimals + '}' : '*') + (self.options.decimals ? '{0,' + self.options.decimals + '}' : '*')
+ '$)' + '$)'
) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+)'); ) : new RegExp('(^' + (self.options.min < 0 ? '\\-?' : '') + '\\d+)');
if (type == 'float') { if (type == 'float') {

View file

@ -5,7 +5,6 @@ Ox.Label <f:Ox.Element> Label Object
(options) -> <f> Label Object (options) -> <f> Label Object
(options, self) -> <f> Label Object (options, self) -> <f> Label Object
options <o> Options object options <o> Options object
@*/ @*/
Ox.Label = function(options, self) { Ox.Label = function(options, self) {

View file

@ -6,20 +6,20 @@ Ox.Range <f:Ox.Element> Range Object
(options, self) -> <f> Range Object (options, self) -> <f> Range Object
options <o> Options object options <o> Options object
arrows <b> if true, show arrows arrows <b> if true, show arrows
arrowStep <n> step when clicking arrows arrowStep <n> step when clicking arrows
arrowSymbols <a> arrow symbols, like ['minus', 'plus'] arrowSymbols <a> arrow symbols, like ['minus', 'plus']
max <n> maximum value max <n> maximum value
min <n> minimum value min <n> minimum value
orientation <s> 'horizontal' or 'vertical' orientation <s> 'horizontal' or 'vertical'
step <n> step between values step <n> step between values
size <n> width or height, in px size <n> width or height, in px
thumbSize <n> minimum width or height of thumb, in px thumbSize <n> minimum width or height of thumb, in px
thumbValue <b> if true, display value on thumb thumbValue <b> if true, display value on thumb
trackGradient <a> colors trackGradient <a> colors
trackImages <s|[s]> one or multiple track background image URLs trackImages <s|[s]> one or multiple track background image URLs
trackStep <n> 0 (scroll here) or step when clicking track trackStep <n> 0 (scroll here) or step when clicking track
value <n> initial value value <n> initial value
valueNames <a> value names to display on thumb valueNames <a> value names to display on thumb
self <o> shared private variable self <o> shared private variable
change <!> triggered on change of the range change <!> triggered on change of the range
@*/ @*/

View file

@ -1,5 +1,5 @@
Ox.InfoList = function(options, self) { Ox.InfoList = function(options, self) {
self = self || {}; self = self || {};
var that = Ox.Element({}, self) var that = Ox.Element({}, self)
.defaults({ .defaults({
@ -64,7 +64,7 @@ Ox.InfoList = function(options, self) {
info: {} info: {}
}; };
Ox.print('DATA -=-------', data) Ox.print('DATA -=-------', data)
var $icon = Ox.Element() var $icon = Ox.Element()
.css({ .css({
float: 'left', float: 'left',

View file

@ -72,13 +72,13 @@ Ox.List = function(options, self) {
.options(options || {}) .options(options || {})
.scroll(scroll); .scroll(scroll);
that.$content.bindEvent({ that.$content.bindEvent({
mousedown: mousedown, mousedown: mousedown,
singleclick: singleclick, singleclick: singleclick,
doubleclick: doubleclick doubleclick: doubleclick
}); });
if (self.options.draggable) { if (self.options.draggable) {
that.$content.bindEvent({ that.$content.bindEvent({
dragstart: dragstart, dragstart: dragstart,
drag: drag, drag: drag,
dragpause: dragpause, dragpause: dragpause,
@ -87,7 +87,7 @@ Ox.List = function(options, self) {
dragend: dragend dragend: dragend
}); });
} else if (self.options.sortable) { } else if (self.options.sortable) {
that.$content.bindEvent({ that.$content.bindEvent({
dragstart: movestart, dragstart: movestart,
drag: move, drag: move,
dragend: moveend dragend: moveend
@ -372,7 +372,7 @@ Ox.List = function(options, self) {
}); });
} }
} }
function drag(data) { function drag(data) {
self.drag && that.triggerEvent('draganddrop', { self.drag && that.triggerEvent('draganddrop', {
ids: self.drag.ids, ids: self.drag.ids,
@ -887,7 +887,7 @@ Ox.List = function(options, self) {
clickable, editable; clickable, editable;
if (pos > -1) { if (pos > -1) {
if ( if (
!data.metaKey && !data.shiftKey !data.metaKey && !data.shiftKey
&& isSelected(pos) && self.selected.length > 1 && isSelected(pos) && self.selected.length > 1
) { ) {
// click on one of multiple selected items // click on one of multiple selected items

View file

@ -723,7 +723,7 @@ Ox.TextList = function(options, self) {
pos = getColumnPositionById(id); pos = getColumnPositionById(id);
self.options.columns[i].width = width; self.options.columns[i].width = width;
self.columnWidths[pos] = width; self.columnWidths[pos] = width;
if (self.options.columnsVisible) { if (self.options.columnsVisible) {
that.$head.$content.css({ that.$head.$content.css({
width: (Ox.sum(self.columnWidths) + 2) + 'px' width: (Ox.sum(self.columnWidths) + 2) + 'px'
}); });
@ -784,7 +784,7 @@ Ox.TextList = function(options, self) {
self.selectedColumn = getColumnIndexById(self.options.sort[0].key); self.selectedColumn = getColumnIndexById(self.options.sort[0].key);
toggleSelected(self.options.columns[self.selectedColumn].id); toggleSelected(self.options.columns[self.selectedColumn].id);
} }
} }
} }
function updateOrder(id) { function updateOrder(id) {
@ -959,7 +959,7 @@ Ox.TextList = function(options, self) {
id = value; id = value;
} }
$cell = getCell(id, key); $cell = getCell(id, key);
$cell && $cell.html(formatValue(key, value, that.$body.value(id))); $cell && $cell.html(formatValue(key, value, that.$body.value(id)));
if (key == self.options.sort[0].key) { if (key == self.options.sort[0].key) {
// sort key has changed // sort key has changed
that.$body.sort(); that.$body.sort();

View file

@ -220,5 +220,5 @@ Ox.TreeList = function(options, self) {
}; };
return that; return that;
}; };

View file

@ -521,7 +521,7 @@ Ox.ListMap = function(options, self) {
type: 'float' type: 'float'
}).hide() }).hide()
]); ]);
self.$placeForm = Ox.Form({ self.$placeForm = Ox.Form({
items: self.$placeFormItems, items: self.$placeFormItems,
width: 240 width: 240

View file

@ -654,7 +654,7 @@ Ox.Map = function(options, self) {
} }
function getMetersPerPixel() { function getMetersPerPixel() {
// m/px = m/deg * deg/px // m/px = m/deg * deg/px
var degreesPerPixel = 360 / (Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom())); var degreesPerPixel = 360 / (Ox.MAP_TILE_SIZE * Math.pow(2, self.map.getZoom()));
return Ox.getMetersPerDegree(self.map.getCenter().lat()) * degreesPerPixel; return Ox.getMetersPerDegree(self.map.getCenter().lat()) * degreesPerPixel;
} }
@ -883,10 +883,10 @@ Ox.Map = function(options, self) {
if (!self.isAsync) { if (!self.isAsync) {
self.places.sort(function(a, b) { self.places.sort(function(a, b) {
var sort = { var sort = {
a: a.selected ? Infinity : a: a.selected ? Infinity
bounds.contains(a.center) ? a.area : -Infinity, : bounds.contains(a.center) ? a.area : -Infinity,
b: b.selected ? Infinity : b: b.selected ? Infinity
bounds.contains(b.center) ? b.area : -Infinity, : bounds.contains(b.center) ? b.area : -Infinity,
}; };
return sort.b - sort.a; return sort.b - sort.a;
}).forEach(function(place, i) { }).forEach(function(place, i) {
@ -1434,7 +1434,7 @@ Ox.Map = function(options, self) {
that.removePlace = function() { that.removePlace = function() {
// fixme: removePlaceFromPlaces() ? // fixme: removePlaceFromPlaces() ?
removePlace(); removePlace();
return that; return that;
}; };
that.resizeMap = function() { that.resizeMap = function() {

View file

@ -274,7 +274,7 @@ Ox.MapMarker = function(options) {
google.maps.event.addListener(that.marker, 'dragend', dragend); google.maps.event.addListener(that.marker, 'dragend', dragend);
return that; return that;
}; };
/*@ /*@
remove <f> remove marker remove <f> remove marker
() -> <f> remove marker from map, returns MapMarker () -> <f> remove marker from map, returns MapMarker

View file

@ -16,7 +16,7 @@ Ox.MapPlace <f> MapPlace Object
south <n|0> south <n|0>
type <s|''> type <s|''>
visible <b|false> visible <b|false>
west <n|0> west <n|0>
@*/ @*/
Ox.MapPlace = function(options) { Ox.MapPlace = function(options) {
@ -34,7 +34,7 @@ Ox.MapPlace = function(options) {
south: 0, south: 0,
type: '', type: '',
visible: false, visible: false,
west: 0 west: 0
}, options); }, options);
var that = this; var that = this;
@ -202,7 +202,7 @@ Ox.MapPlace = function(options) {
that.map.triggerEvent('changeplace', that); that.map.triggerEvent('changeplace', that);
return that; return that;
}; };
/*@ /*@
undo <f> undo undo <f> undo
@*/ @*/

View file

@ -119,5 +119,5 @@ Ox.MapRectangle = function(options, self) {
} }
return that; return that;
}; };

View file

@ -66,8 +66,8 @@ Ox.MapRectangleMarker = function(options, self) {
if (that.position.indexOf('e') > -1) { if (that.position.indexOf('e') > -1) {
that.place.east = lng; that.place.east = lng;
} }
Ox.print('west', that.place.west, 'east', that.place.east); //Ox.print('west', that.place.west, 'east', that.place.east);
Ox.print('south', that.place.south, 'north', that.place.north); //Ox.print('south', that.place.south, 'north', that.place.north);
that.place.update(); that.place.update();
that.place.marker.update(); that.place.marker.update();
that.place.rectangle.update(); that.place.rectangle.update();

View file

@ -536,7 +536,7 @@ Ox.Menu = function(options, self) {
addItem <f> addItem <f>
@*/ @*/
that.addItem = function(item, position) { that.addItem = function(item, position) {
}; };
/*@ /*@

View file

@ -170,12 +170,11 @@ Ox.SplitPanel = function(options, self) {
} }
self.$resizebars[i == 0 ? 0 : 1].options({size: element.size}); self.$resizebars[i == 0 ? 0 : 1].options({size: element.size});
} }
}); });
} }
/*@ /*@
isCollapsed <f> panel collapsed state isCollapsed <f> panel collapsed state
(id) -> <b> id or position of panel, returns collapsed state (id) -> <b> id or position of panel, returns collapsed state
id <i> The element's id or position id <i> The element's id or position
@*/ @*/
@ -185,7 +184,7 @@ Ox.SplitPanel = function(options, self) {
}; };
/*@ /*@
repleaseElement <f> replace panel element repleaseElement <f> replace panel element
(id, element) -> <f> replace element (id, element) -> <f> replace element
id <s|i> The element's id or position id <s|i> The element's id or position
element <o> new element element <o> new element

View file

@ -172,7 +172,6 @@ Ox.BlockVideoTimeline = function(options, self) {
Ox.formatDuration(position) Ox.formatDuration(position)
}) })
.show(e.clientX, e.clientY); .show(e.clientX, e.clientY);
} else { } else {
self.$tooltip.hide(); self.$tooltip.hide();
} }

View file

@ -97,8 +97,7 @@ Ox.SmallVideoTimeline = function(options, self) {
} }
function getPosition(e) { function getPosition(e) {
var position = var position = (
(
(e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left) - (e.offsetX ? e.offsetX : e.clientX - $(e.target).offset().left) -
(self.options.type == 'player' ? 8 : 0) (self.options.type == 'player' ? 8 : 0)
) * self.options.duration / self.imageWidth; ) * self.options.duration / self.imageWidth;

View file

@ -275,7 +275,7 @@ Ox.VideoEditor = function(options, self) {
) )
.bindEvent({ .bindEvent({
add: function(data) { add: function(data) {
data.layer = layer.id; data.layer = layer.id;
data['in'] = self.options['in']; data['in'] = self.options['in'];
data.out = self.options.out; data.out = self.options.out;
that.triggerEvent('addannotation', data); that.triggerEvent('addannotation', data);
@ -440,7 +440,7 @@ Ox.VideoEditor = function(options, self) {
} }
}); });
//.appendTo(self.$videobar); //.appendTo(self.$videobar);
if (self.options.posterFrameControls) { if (self.options.posterFrameControls) {
self.$goToPosterButton = Ox.Button({ self.$goToPosterButton = Ox.Button({
@ -598,7 +598,6 @@ Ox.VideoEditor = function(options, self) {
{id: 'smallText', title: 'Small', checked: true}, {id: 'smallText', title: 'Small', checked: true},
{id: 'mediumText', title: 'Medium'}, {id: 'mediumText', title: 'Medium'},
{id: 'largeText', title: 'Large'} {id: 'largeText', title: 'Large'}
], ],
max: 2, max: 2,
title: 'set', title: 'set',
@ -772,9 +771,9 @@ Ox.VideoEditor = function(options, self) {
function getSizes(scrollbarIsVisible) { function getSizes(scrollbarIsVisible) {
//Ox.print('getSizes', scrollbarIsVisible) //Ox.print('getSizes', scrollbarIsVisible)
var scrollbarWidth = Ox.UI.SCROLLBAR_SIZE, var scrollbarWidth = Ox.UI.SCROLLBAR_SIZE,
contentWidth = self.options.width - contentWidth = self.options.width
(self.options.showAnnotations * self.options.annotationsSize) - 1 - - (self.options.showAnnotations * self.options.annotationsSize) - 1
(scrollbarIsVisible ? scrollbarWidth : 0), - (scrollbarIsVisible ? scrollbarWidth : 0),
height, height,
lines, lines,
size = { size = {
@ -1008,7 +1007,7 @@ Ox.VideoEditor = function(options, self) {
self.$player[0].togglePaused(); self.$player[0].togglePaused();
/* fixme /* fixme
self.$player[0].options('paused') && that.triggerEvent('position', { self.$player[0].options('paused') && that.triggerEvent('position', {
}); });
*/ */
} }

View file

@ -238,7 +238,7 @@ Ox.VideoPanelPlayer = function(options, self) {
//self.$video.position(self.options.position); //self.$video.position(self.options.position);
self.$timeline.options({ self.$timeline.options({
position: self.options.position position: self.options.position
}); });
} }
function toggleAnnotations(data) { function toggleAnnotations(data) {
@ -291,7 +291,7 @@ Ox.VideoPanelPlayer = function(options, self) {
/*@ /*@
toggleAnnotations <f> toggle annotations toggleAnnotations <f> toggle annotations
() -> <o> toggle visibility of annotations () -> <o> toggle visibility of annotations
@*/ @*/
that.toggleAnnotations = function() { that.toggleAnnotations = function() {
that.$element.toggle(1); that.$element.toggle(1);