Compare commits

..

3 commits

Author SHA1 Message Date
j
543045ae6c no chapters 2023-06-30 15:56:59 +05:30
j
0dfed9de74 no annotations 2023-06-30 15:56:41 +05:30
j
9b5bb2cd06 fix setting place to null 2023-06-30 15:45:03 +05:30
3 changed files with 11 additions and 9 deletions

View file

@ -1041,7 +1041,7 @@ Ox.MapEditor = function(options, self) {
var isResult = place && place.id[0] == '_',
isUndefined = !!self.options.selected
&& !self.$list.value(self.options.selected, 'type');
self.selectedPlace = place.id || '';
self.selectedPlace = place && place.id ? place.id : '';
if (isResult && isUndefined) {
Ox.print('place.id', place.id, 'self.options.selected', self.options.selected, 'type', self.$list.value(self.options.selected));
// define undefined place

View file

@ -1794,21 +1794,23 @@ Ox.VideoPlayer = function(options, self) {
function goToNext(type, direction) {
// type can be 'chapter' or 'result'
var position, positions;
if (type == 'chapter') {
if (type == 'chapter' && self.options.chapters) {
positions = self.options.chapters.map(function(chapter) {
return chapter.position;
});
} else if (type == 'result') {
} else if (type == 'result' && self.results) {
positions = Ox.unique(self.results.map(function(result) {
return result['in'];
}));
}
if (positions) {
position = Ox.nextValue(positions, self.options.position, direction);
setPosition(position);
that.triggerEvent('position', {
position: self.options.position
});
}
}
function goToPoint() {
that.triggerEvent('gotopoint');

View file

@ -478,7 +478,7 @@ Ox.VideoPlayerPanel = function(options, self) {
}
function getAnnotations() {
return Ox.flatten(self.options.layers.map(function(layer) {
return !self.options.layers ? [] : Ox.flatten(self.options.layers.map(function(layer) {
return layer.items.map(function(item) {
return {id: item.id, 'in': item['in'], out: item.out, text: item.value};
});