1
0
Fork 0
forked from 0x2620/oxjs

fix event handlers and split panel resize event

This commit is contained in:
rolux 2011-09-17 19:39:38 +02:00
commit da9e5dbb29
27 changed files with 722 additions and 118 deletions

View file

@ -39,7 +39,7 @@ Ox.AnnotationPanel = function(options, self) {
tooltip: 'Add',
type: 'image'
}).bindEvent({
click: function(event, data) {
click: function(data) {
that.triggerEvent('add', {value: ''});
}
})
@ -72,13 +72,13 @@ Ox.AnnotationPanel = function(options, self) {
//reset in/out points
selectAnnotation({}, {ids: [item.id]});
},
open: function(event, data) {
open: function(data) {
if (data.ids.length == 1) {
var pos = Ox.getPositionById(self.$annotations.options('items'), data.ids[0]);
self.$annotations.editItem(pos);
}
},
remove: function(event, data) {
remove: function(data) {
that.triggerEvent('remove', data);
},
select: selectAnnotation,
@ -100,7 +100,7 @@ Ox.AnnotationPanel = function(options, self) {
.appendTo(self.$annotations);
});
*/
function selectAnnotation(event, data) {
function selectAnnotation(data) {
var item = Ox.getObjectById(self.options.items, data.ids[0]);
item && that.triggerEvent('select', {
'in': item['in'],
@ -108,7 +108,7 @@ Ox.AnnotationPanel = function(options, self) {
'layer': self.options.id
});
}
function updateAnnotation(event, data) {
function updateAnnotation(data) {
var item = Ox.getObjectById(self.options.items, data.id);
item.value = data.value;
that.triggerEvent('submit', item);