various annotation-related bugfixes
This commit is contained in:
parent
198e11c59b
commit
a7a3f167c9
10 changed files with 135 additions and 75 deletions
|
@ -42,7 +42,8 @@ Ox.Calendar = function(options, self) {
|
||||||
showTypes: ['date', 'place', 'person', 'other'],
|
showTypes: ['date', 'place', 'person', 'other'],
|
||||||
showZoombar: false,
|
showZoombar: false,
|
||||||
width: 256,
|
width: 256,
|
||||||
zoom: 8
|
zoom: 8,
|
||||||
|
zoomOnlyWhenFocused: false
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxCalendar')
|
.addClass('OxCalendar')
|
||||||
|
@ -833,6 +834,9 @@ Ox.Calendar = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMouseDate(e) {
|
function getMouseDate(e) {
|
||||||
|
Ox.print('mousedate', e.clientX, that.offset().left, self.options.width, new Date(+self.options.date + (
|
||||||
|
e.clientX - that.offset().left - self.options.width / 2 - 1
|
||||||
|
) * getSecondsPerPixel() * 1000))
|
||||||
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);
|
||||||
|
@ -945,7 +949,11 @@ Ox.Calendar = function(options, self) {
|
||||||
function mousewheel(e, delta, deltaX, deltaY) {
|
function mousewheel(e, delta, deltaX, deltaY) {
|
||||||
//Ox.Log('Calendar', 'mousewheel', delta, deltaX, deltaY);
|
//Ox.Log('Calendar', 'mousewheel', delta, deltaX, deltaY);
|
||||||
var deltaZ = 0;
|
var deltaZ = 0;
|
||||||
if (!self.mousewheel && Math.abs(deltaY) > Math.abs(deltaX)) {
|
if (
|
||||||
|
(!self.options.zoomOnlyWhenFocused || that.hasFocus())
|
||||||
|
&& !self.mousewheel
|
||||||
|
&& Math.abs(deltaY) > Math.abs(deltaX)
|
||||||
|
) {
|
||||||
if (deltaY < 0 && self.options.zoom > 0) {
|
if (deltaY < 0 && self.options.zoom > 0) {
|
||||||
deltaZ = -1;
|
deltaZ = -1;
|
||||||
} else if (deltaY > 0 && self.options.zoom < self.maxZoom) {
|
} else if (deltaY > 0 && self.options.zoom < self.maxZoom) {
|
||||||
|
@ -962,6 +970,7 @@ Ox.Calendar = function(options, self) {
|
||||||
self.mousewheel = false;
|
self.mousewheel = false;
|
||||||
}, 250);
|
}, 250);
|
||||||
}
|
}
|
||||||
|
that.hasFocus() && e.preventDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
function overlaps(eventA, eventB) {
|
function overlaps(eventA, eventB) {
|
||||||
|
|
|
@ -24,10 +24,14 @@ Ox.Focus = (function() {
|
||||||
stack.length == 1
|
stack.length == 1
|
||||||
? stack.pop()
|
? stack.pop()
|
||||||
: stack.splice(stack.length - 2, 0, stack.pop());
|
: stack.splice(stack.length - 2, 0, stack.pop());
|
||||||
//$elements[id].removeClass('OxFocus');
|
Ox.UI.elements[id]
|
||||||
$('.OxFocus').removeClass('OxFocus'); // fixme: the above is better, and should work
|
.removeClass('OxFocus')
|
||||||
stack.length && Ox.UI.elements[stack[stack.length - 1]]
|
.triggerEvent('losefocus');
|
||||||
.addClass('OxFocus')/*.triggerEvent('focus')*/;
|
if (stack.length) {
|
||||||
|
Ox.UI.elements[stack[stack.length - 1]]
|
||||||
|
.addClass('OxFocus')
|
||||||
|
.triggerEvent('gainfocus')
|
||||||
|
}
|
||||||
Ox.Log('Core', 'blur', id, stack);
|
Ox.Log('Core', 'blur', id, stack);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -40,10 +44,16 @@ Ox.Focus = (function() {
|
||||||
if (index == -1 || index < stack.length - 1) {
|
if (index == -1 || index < stack.length - 1) {
|
||||||
index > -1 && stack.splice(index, 1);
|
index > -1 && stack.splice(index, 1);
|
||||||
stack.push(id);
|
stack.push(id);
|
||||||
$('.OxFocus').removeClass('OxFocus'); // fixme: see above
|
if (stack.length > 1) {
|
||||||
Ox.Log('Core', 'focus', id, stack);
|
Ox.print('...', Object.keys(Ox.UI.elements[stack[stack.length - 2]]))
|
||||||
|
Ox.UI.elements[stack[stack.length - 2]]
|
||||||
|
.removeClass('OxFocus')
|
||||||
|
.triggerEvent('losefocus')
|
||||||
|
}
|
||||||
Ox.UI.elements[id]
|
Ox.UI.elements[id]
|
||||||
.addClass('OxFocus')/*.triggerEvent('focus')*/;
|
.addClass('OxFocus')
|
||||||
|
.triggerEvent('gainfocus');
|
||||||
|
Ox.Log('Core', 'focus', id, stack);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*@
|
/*@
|
||||||
|
|
|
@ -11,6 +11,7 @@ Ox.LoadingIcon <f:Ox.Element> Loading Icon Element
|
||||||
@*/
|
@*/
|
||||||
|
|
||||||
Ox.LoadingIcon = function(options, self) {
|
Ox.LoadingIcon = function(options, self) {
|
||||||
|
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element('<img>', self)
|
var that = Ox.Element('<img>', self)
|
||||||
.defaults({
|
.defaults({
|
||||||
|
@ -23,6 +24,11 @@ Ox.LoadingIcon = function(options, self) {
|
||||||
.addClass(
|
.addClass(
|
||||||
'OxLoadingIcon Ox' + Ox.toTitleCase(self.options.size)
|
'OxLoadingIcon Ox' + Ox.toTitleCase(self.options.size)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
self.setOption = function(key, value) {
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
start <f> Start loading animation
|
start <f> Start loading animation
|
||||||
() -> <f> Loading Icon Element
|
() -> <f> Loading Icon Element
|
||||||
|
@ -36,6 +42,7 @@ Ox.LoadingIcon = function(options, self) {
|
||||||
}, 250);
|
}, 250);
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
stop <f> Stop loading animation
|
stop <f> Stop loading animation
|
||||||
() -> <f> Loading Icon Element
|
() -> <f> Loading Icon Element
|
||||||
|
@ -50,5 +57,7 @@ Ox.LoadingIcon = function(options, self) {
|
||||||
});
|
});
|
||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,9 @@ Ox.Request = (function() {
|
||||||
// cancel by id
|
// cancel by id
|
||||||
delete requests[arguments[0]];
|
delete requests[arguments[0]];
|
||||||
}
|
}
|
||||||
|
$element && $element.triggerEvent('request', {
|
||||||
|
requests: Ox.len(requests)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/*@
|
/*@
|
||||||
clearCache <f> clear cached results
|
clearCache <f> clear cached results
|
||||||
|
@ -60,11 +63,12 @@ Ox.Request = (function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
bindEvent <f> bindEvent to error/authrize requests
|
bindEvent <f> Unbind event
|
||||||
@*/
|
@*/
|
||||||
bindEvent: function() {
|
bindEvent: function() {
|
||||||
if(!$element) {
|
if (!$element) {
|
||||||
$element = Ox.Element();
|
$element = Ox.Element();
|
||||||
}
|
}
|
||||||
$element.bindEvent.apply(this, arguments);
|
$element.bindEvent.apply(this, arguments);
|
||||||
|
@ -146,12 +150,18 @@ Ox.Request = (function() {
|
||||||
url: options.url
|
url: options.url
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
$element && $element.triggerEvent('request', {
|
||||||
|
requests: Ox.len(requests)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function callback(data) {
|
function callback(data) {
|
||||||
if (requests[options.id]) {
|
if (requests[options.id]) {
|
||||||
delete requests[options.id];
|
delete requests[options.id];
|
||||||
options.callback && options.callback(data);
|
options.callback && options.callback(data);
|
||||||
|
$element && $element.triggerEvent('request', {
|
||||||
|
requests: Ox.len(requests)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +207,7 @@ Ox.Request = (function() {
|
||||||
},
|
},
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
unbindEvent <f> unbindEvent for error/authrize requests
|
unbindEvent <f> Unbind event
|
||||||
@*/
|
@*/
|
||||||
unbindEvent: function() {
|
unbindEvent: function() {
|
||||||
$element && $element.unbindEvent.apply(this, arguments);
|
$element && $element.unbindEvent.apply(this, arguments);
|
||||||
|
|
|
@ -7,9 +7,7 @@ Ox.ArrayEditable <f> Array Editable Object
|
||||||
Ox.ArrayEditable = function(options, self) {
|
Ox.ArrayEditable = function(options, self) {
|
||||||
|
|
||||||
self = self || {};
|
self = self || {};
|
||||||
var that = Ox.Element(options.editable === false ? {} : {
|
var that = Ox.Element({}, self)
|
||||||
tooltip: 'Doubleclick to add ' + (options.itemName || 'item')
|
|
||||||
}, self)
|
|
||||||
.defaults({
|
.defaults({
|
||||||
clickLink: null,
|
clickLink: null,
|
||||||
editable: true,
|
editable: true,
|
||||||
|
@ -29,8 +27,6 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
.addClass('OxArrayEditable OxArrayEditable' + Ox.toTitleCase(self.options.type))
|
.addClass('OxArrayEditable OxArrayEditable' + Ox.toTitleCase(self.options.type))
|
||||||
.css({width: self.options.width - (self.options.type == 'input' ? 8 : 0) + 'px'}) // 2 x 4 px padding
|
.css({width: self.options.width - (self.options.type == 'input' ? 8 : 0) + 'px'}) // 2 x 4 px padding
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
anyclick: anyclick,
|
|
||||||
doubleclick: doubleclick,
|
|
||||||
key_delete: deleteItem,
|
key_delete: deleteItem,
|
||||||
key_enter: function() {
|
key_enter: function() {
|
||||||
// make sure the newline does
|
// make sure the newline does
|
||||||
|
@ -43,7 +39,8 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
key_down: self.options.type == 'input' ? selectLast : selectNext,
|
key_down: self.options.type == 'input' ? selectLast : selectNext,
|
||||||
key_left: self.options.type == 'input' ? selectPrevious : selectFirst,
|
key_left: self.options.type == 'input' ? selectPrevious : selectFirst,
|
||||||
key_right: self.options.type == 'input' ? selectNext : selectLast,
|
key_right: self.options.type == 'input' ? selectNext : selectLast,
|
||||||
key_up: self.options.type == 'input' ? selectFirst : selectPrevious
|
key_up: self.options.type == 'input' ? selectFirst : selectPrevious,
|
||||||
|
singleclick: singleclick
|
||||||
});
|
});
|
||||||
|
|
||||||
self.$items = [];
|
self.$items = [];
|
||||||
|
@ -53,35 +50,6 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
|
|
||||||
self.selected = getSelectedPosition();
|
self.selected = getSelectedPosition();
|
||||||
|
|
||||||
function anyclick(e) {
|
|
||||||
Ox.print('SELF EDITING', self.editing)
|
|
||||||
var $target = $(e.target),
|
|
||||||
$parent = $target.parent(),
|
|
||||||
position = $parent.data('position');
|
|
||||||
if (!$target.is('.OxInput')) {
|
|
||||||
Ox.print('BLURRED EDITING', self.blurred, self.editing)
|
|
||||||
if ($parent.is('.OxEditableElement')) {
|
|
||||||
if (!$parent.is('.OxSelected')) {
|
|
||||||
// select another item
|
|
||||||
selectItem(
|
|
||||||
e.metaKey && position == self.selected
|
|
||||||
? '' : $parent.data('position')
|
|
||||||
);
|
|
||||||
}
|
|
||||||
} else if (!self.blurred) {
|
|
||||||
// if there wasn't an active input element
|
|
||||||
if (self.editing) {
|
|
||||||
// blur if still in editing mode
|
|
||||||
that.blurItem();
|
|
||||||
} else {
|
|
||||||
// othewise deselect selected
|
|
||||||
selectNone();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
that.gainFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function deleteItem() {
|
function deleteItem() {
|
||||||
if (self.options.editable) {
|
if (self.options.editable) {
|
||||||
self.options.items.splice(self.selected, 1);
|
self.options.items.splice(self.selected, 1);
|
||||||
|
@ -95,6 +63,7 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function doubleclick(e) {
|
function doubleclick(e) {
|
||||||
|
// fixme: unused
|
||||||
var $target = $(e.target),
|
var $target = $(e.target),
|
||||||
$parent = $target.parent();
|
$parent = $target.parent();
|
||||||
if ($parent.is('.OxEditableElement')) {
|
if ($parent.is('.OxEditableElement')) {
|
||||||
|
@ -119,9 +88,8 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
that.empty();
|
that.empty();
|
||||||
if (self.options.items.length == 0) {
|
if (self.options.items.length == 0) {
|
||||||
Ox.Editable({
|
Ox.Editable({
|
||||||
clickLink: self.options.clickLink,
|
|
||||||
editable: false,
|
editable: false,
|
||||||
type: 'text',
|
type: self.options.type,
|
||||||
value: self.options.placeholder
|
value: self.options.placeholder
|
||||||
})
|
})
|
||||||
.addClass('OxPlaceholder')
|
.addClass('OxPlaceholder')
|
||||||
|
@ -182,6 +150,9 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
edit: function(data) {
|
edit: function(data) {
|
||||||
|
if (item.id != self.options.selected) {
|
||||||
|
selectItem(item.id);
|
||||||
|
}
|
||||||
self.editing = true;
|
self.editing = true;
|
||||||
that.triggerEvent('edit', data);
|
that.triggerEvent('edit', data);
|
||||||
},
|
},
|
||||||
|
@ -237,6 +208,33 @@ Ox.ArrayEditable = function(options, self) {
|
||||||
self.selected > 0 && selectItem(self.selected - 1);
|
self.selected > 0 && selectItem(self.selected - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function singleclick(e) {
|
||||||
|
var $target = $(e.target),
|
||||||
|
$element = $target.parents('.OxEditableElement'),
|
||||||
|
position = $element.data('position');
|
||||||
|
if (!$target.is('.OxInput')) {
|
||||||
|
if ($element.length) {
|
||||||
|
if (!$element.is('.OxSelected')) {
|
||||||
|
// select another item
|
||||||
|
selectItem(
|
||||||
|
e.metaKey && position == self.selected
|
||||||
|
? '' : position
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else if (!self.blurred) {
|
||||||
|
// if there wasn't an active input element
|
||||||
|
if (self.editing) {
|
||||||
|
// blur if still in editing mode
|
||||||
|
that.blurItem();
|
||||||
|
} else {
|
||||||
|
// othewise deselect selected
|
||||||
|
selectNone();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
that.gainFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function sortItems() {
|
function sortItems() {
|
||||||
if (!Ox.isEmpty(self.options.sort)) {
|
if (!Ox.isEmpty(self.options.sort)) {
|
||||||
self.options.items = Ox.sortBy(self.options.items, self.options.sort);
|
self.options.items = Ox.sortBy(self.options.items, self.options.sort);
|
||||||
|
|
|
@ -43,13 +43,8 @@ Ox.Editable = function(options, self) {
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
doubleclick: edit,
|
doubleclick: edit,
|
||||||
singleclick: function(e) {
|
singleclick: function(e) {
|
||||||
var $target = $(e.target),
|
var $target = $(e.target);
|
||||||
$parent = $target.parent();
|
if ($target.is('a') || ($target = $target.parents('a')).length) {
|
||||||
while(!$target.is('a') && !$parent.is('.OxEditableElement')) {
|
|
||||||
$target = $parent;
|
|
||||||
$parent = $target.parent();
|
|
||||||
}
|
|
||||||
if($target.is('a')) {
|
|
||||||
if (self.options.clickLink) {
|
if (self.options.clickLink) {
|
||||||
e.target = $target[0];
|
e.target = $target[0];
|
||||||
self.options.clickLink(e);
|
self.options.clickLink(e);
|
||||||
|
@ -107,6 +102,7 @@ Ox.Editable = function(options, self) {
|
||||||
function edit() {
|
function edit() {
|
||||||
var height, width;
|
var height, width;
|
||||||
if (self.options.editable && !self.options.editing) {
|
if (self.options.editable && !self.options.editing) {
|
||||||
|
Ox.print('EDIT???')
|
||||||
self.options.editing = true;
|
self.options.editing = true;
|
||||||
that.addClass('OxEditing');
|
that.addClass('OxEditing');
|
||||||
self.originalValue = self.options.value;
|
self.originalValue = self.options.value;
|
||||||
|
|
|
@ -40,6 +40,7 @@ Ox.Map <function> Basic map object
|
||||||
statusbar <b|false> If true, the map has a statusbar
|
statusbar <b|false> If true, the map has a statusbar
|
||||||
toolbar <b|false> If true, the map has a toolbar
|
toolbar <b|false> If true, the map has a toolbar
|
||||||
zoombar <b|false> If true, the map has a zoombar
|
zoombar <b|false> If true, the map has a zoombar
|
||||||
|
zoomOnlyWhenFocused <b|false> If true, scroll-zoom only when focused
|
||||||
self <o|{}> Shared private variable
|
self <o|{}> Shared private variable
|
||||||
# EVENTS -------------------------------------------------------------------
|
# EVENTS -------------------------------------------------------------------
|
||||||
addplace <!> Fires when a place has been added
|
addplace <!> Fires when a place has been added
|
||||||
|
@ -110,15 +111,19 @@ Ox.Map = function(options, self) {
|
||||||
showTypes: false,
|
showTypes: false,
|
||||||
statusbar: false, // FIXME: showStatusbar
|
statusbar: false, // FIXME: showStatusbar
|
||||||
toolbar: false, // FIXME: showToolbar
|
toolbar: false, // FIXME: showToolbar
|
||||||
zoombar: false // FIXME: showZoombar
|
zoombar: false, // FIXME: showZoombar
|
||||||
|
zoomOnlyWhenFocused: false
|
||||||
// fixme: width, height
|
// fixme: width, height
|
||||||
})
|
})
|
||||||
.options(options || {})
|
.options(options || {})
|
||||||
.addClass('OxMap')
|
.addClass('OxMap')
|
||||||
.click(function(e) {
|
|
||||||
!$(e.target).is('input') && that.gainFocus();
|
|
||||||
})
|
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
gainfocus: function() {
|
||||||
|
self.options.zoomOnlyWhenFocused && self.map.setOptions({scrollwheel: true});
|
||||||
|
},
|
||||||
|
losefocus: function() {
|
||||||
|
self.options.zoomOnlyWhenFocused && self.map.setOptions({scrollwheel: false});
|
||||||
|
},
|
||||||
key_0: function() {
|
key_0: function() {
|
||||||
panToPlace()
|
panToPlace()
|
||||||
},
|
},
|
||||||
|
@ -181,7 +186,10 @@ Ox.Map = function(options, self) {
|
||||||
key_up: function() {
|
key_up: function() {
|
||||||
pan(0, -1);
|
pan(0, -1);
|
||||||
},
|
},
|
||||||
key_z: undo
|
key_z: undo,
|
||||||
|
mousedown: function(e) {
|
||||||
|
!$(e.target).is('input') && that.gainFocus();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
self.isAsync = Ox.isFunction(self.options.places);
|
self.isAsync = Ox.isFunction(self.options.places);
|
||||||
|
@ -808,6 +816,7 @@ Ox.Map = function(options, self) {
|
||||||
disableDoubleClickZoom: true,
|
disableDoubleClickZoom: true,
|
||||||
mapTypeId: google.maps.MapTypeId[getMapType()],
|
mapTypeId: google.maps.MapTypeId[getMapType()],
|
||||||
noClear: true,
|
noClear: true,
|
||||||
|
scrollwheel: !self.options.zoomOnlyWhenFocused,
|
||||||
zoom: self.zoom
|
zoom: self.zoom
|
||||||
});
|
});
|
||||||
google.maps.event.addListener(self.map, 'bounds_changed', boundsChanged);
|
google.maps.event.addListener(self.map, 'bounds_changed', boundsChanged);
|
||||||
|
|
|
@ -72,23 +72,34 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$addButton = Ox.Button({
|
self.$addButton = Ox.Button({
|
||||||
disabled: !self.options.editable,
|
id: 'add',
|
||||||
id: 'add',
|
style: 'symbol',
|
||||||
style: 'symbol',
|
title: 'add',
|
||||||
title: 'add',
|
tooltip: 'Add ' + self.options.item,
|
||||||
tooltip: 'Add ' + self.options.item,
|
type: 'image'
|
||||||
type: 'image'
|
})
|
||||||
}).bindEvent({
|
.bindEvent({
|
||||||
click: function() {
|
click: function() {
|
||||||
that.triggerEvent('add', {value: ''});
|
that.triggerEvent('add', {value: ''});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
self.$infoButton = Ox.Button({
|
||||||
|
style: 'symbol',
|
||||||
|
title: 'info',
|
||||||
|
type: 'image'
|
||||||
|
})
|
||||||
|
.bindEvent({
|
||||||
|
click: function() {
|
||||||
|
that.triggerEvent('info');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
self.$panel = Ox.CollapsePanel({
|
self.$panel = Ox.CollapsePanel({
|
||||||
collapsed: self.options.collapsed,
|
collapsed: self.options.collapsed,
|
||||||
extras: Ox.merge(
|
extras: Ox.merge(
|
||||||
self.widget ? [self.$defineButton] : [],
|
self.widget ? [self.$defineButton] : [],
|
||||||
[self.$addButton]
|
[self.options.editable ? self.$addButton : self.$infoButton]
|
||||||
),
|
),
|
||||||
size: 16,
|
size: 16,
|
||||||
title: self.options.title
|
title: self.options.title
|
||||||
|
@ -120,7 +131,8 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
events: getEvents(),
|
events: getEvents(),
|
||||||
height: self.widgetSize,
|
height: self.widgetSize,
|
||||||
showZoombar: true,
|
showZoombar: true,
|
||||||
width: self.options.width
|
width: self.options.width,
|
||||||
|
zoomOnlyWhenFocused: true
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
width: self.options.width + 'px',
|
width: self.options.width + 'px',
|
||||||
|
@ -146,7 +158,8 @@ Ox.AnnotationFolder = function(options, self) {
|
||||||
places: getPlaces(),
|
places: getPlaces(),
|
||||||
showTypes: true,
|
showTypes: true,
|
||||||
// FIXME: should be showZoombar
|
// FIXME: should be showZoombar
|
||||||
zoombar: true
|
zoombar: true,
|
||||||
|
zoomOnlyWhenFocused: true
|
||||||
// showLabels: true
|
// showLabels: true
|
||||||
})
|
})
|
||||||
.css({
|
.css({
|
||||||
|
|
|
@ -185,6 +185,9 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
edit: function() {
|
edit: function() {
|
||||||
that.triggerEvent('edit');
|
that.triggerEvent('edit');
|
||||||
},
|
},
|
||||||
|
info: function(data) {
|
||||||
|
that.triggerEvent('info', {layer: layer.id});
|
||||||
|
},
|
||||||
paused: function() {
|
paused: function() {
|
||||||
that.triggerEvent('paused')
|
that.triggerEvent('paused')
|
||||||
},
|
},
|
||||||
|
|
|
@ -643,6 +643,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
self.editing = true;
|
self.editing = true;
|
||||||
setTimelineState();
|
setTimelineState();
|
||||||
},
|
},
|
||||||
|
info: function(data) {
|
||||||
|
that.triggerEvent('info', data);
|
||||||
|
},
|
||||||
paused: togglePaused,
|
paused: togglePaused,
|
||||||
remove: function(data) {
|
remove: function(data) {
|
||||||
Ox.print('?>???', data)
|
Ox.print('?>???', data)
|
||||||
|
|
Loading…
Reference in a new issue