src/js/widgets/createAnnotationWidget.js
branchpopcorn-port
changeset 645 0c8ca890c9f1
parent 643 3e522b6f7bd0
child 651 c43441822b1b
equal deleted inserted replaced
644:492d3c8d776a 645:0c8ca890c9f1
   269       annotation["begin"] = this._currentAnnotation.begin;
   269       annotation["begin"] = this._currentAnnotation.begin;
   270       annotation["end"] = this._currentAnnotation.end;
   270       annotation["end"] = this._currentAnnotation.end;
   271     }
   271     }
   272   } else {
   272   } else {
   273     var duration = +this._serializer.currentMedia().meta["dc:duration"];    
   273     var duration = +this._serializer.currentMedia().meta["dc:duration"];    
   274     annotation["begin"] = +((duration * (this.sliceLeft / this.selector.width())).toFixed(0));
   274     annotation["begin"] = +((duration * (this.sliceLeft / 100)).toFixed(0));
   275     annotation["end"] = +((duration * ((this.sliceWidth + this.sliceLeft) / this.selector.width())).toFixed(0));
   275     annotation["end"] = +((duration * ((this.sliceWidth + this.sliceLeft) / 100)).toFixed(0));
   276   }
   276   }
   277 
   277   
   278   annotation["type"] = this._serializer.getContributions();
   278   annotation["type"] = this._serializer.getContributions();
   279   if (typeof(annotation["type"]) === "undefined")
   279   if (typeof(annotation["type"]) === "undefined")
   280     annotation["type"] = "";
   280     annotation["type"] = "";
   281   
   281   
   282   annotation["type_title"] = "Contributions";
   282   annotation["type_title"] = "Contributions";