@ -146,15 +146,25 @@ Item.prototype.repositionY = function() {
Item . prototype . _repaintDragCenter = function ( ) {
Item . prototype . _repaintDragCenter = function ( ) {
if ( this . selected && this . options . editable . updateTime && ! this . dom . dragCenter ) {
if ( this . selected && this . options . editable . updateTime && ! this . dom . dragCenter ) {
var me = this ;
var me = this ;
// create and show drag area
// create and show drag area
var dragCenter = document . createElement ( 'div' ) ;
var dragCenter = document . createElement ( 'div' ) ;
dragCenter . className = 'vis-drag-center' ;
dragCenter . className = 'vis-drag-center' ;
dragCenter . dragCenterItem = this ;
dragCenter . dragCenterItem = this ;
var hammer = new Hammer ( dragCenter ) ;
new Hammer ( dragCenter ) . on ( 'doubletap' , function ( event ) {
hammer . on ( 'tap' , function ( event ) {
me . parent . itemSet . body . emitter . emit ( 'click' , {
event : event ,
item : me . id
} ) ;
} ) ;
hammer . on ( 'doubletap' , function ( event ) {
event . stopPropagation ( ) ;
event . stopPropagation ( ) ;
me . parent . itemSet . _onUpdateItem ( me ) ;
me . parent . itemSet . _onUpdateItem ( me ) ;
me . parent . itemSet . body . emitter . emit ( 'doubleClick' , {
event : event ,
item : me . id
} ) ;
} ) ;
} ) ;
if ( this . dom . box ) {
if ( this . dom . box ) {
@ -370,7 +380,6 @@ Item.prototype._updateContents = function (element) {
throw new Error ( 'Property "content" missing in item ' + this . id ) ;
throw new Error ( 'Property "content" missing in item ' + this . id ) ;
}
}
}
}
this . content = content ;
this . content = content ;
}
}
}
}