temporary annotations need all keys

This commit is contained in:
j 2012-02-14 15:42:15 +05:30
parent 4f609f6090
commit fd5ed84a59

View file

@ -286,13 +286,17 @@ pandora.ui.item = function() {
Ox.Log('', 'addAnnotation', data); Ox.Log('', 'addAnnotation', data);
//async to not capture keyboard input //async to not capture keyboard input
setTimeout(function() { setTimeout(function() {
var now = Ox.formatDate(Date(), '%Y-%m-%dT%H:%M:%SZ');
pandora.$ui.editor.addAnnotation(data.layer, Ox.extend({ pandora.$ui.editor.addAnnotation(data.layer, Ox.extend({
created: now,
duration: data.out - data['in'], duration: data.out - data['in'],
editable: true, editable: true,
id: '_' + Ox.uid(), id: '_' + Ox.uid(),
'in': data['in'], 'in': data['in'],
modified: now,
out: data.out, out: data.out,
value: '' user: pandora.user.username,
value: '',
}, },
Ox.getObjectById(pandora.site.layers, data.layer).type == 'place' ? { Ox.getObjectById(pandora.site.layers, data.layer).type == 'place' ? {
place: {lat: null, lng: null} place: {lat: null, lng: null}