예제 #1
0
 /// <summary>
 /// Dispose of this bubble.
 /// </summary>
 public void dispose()
 {
     Bubble.unbindDragEvents_();
     // Dispose of and unlink the bubble.
     goog.dom.removeNode(this.bubbleGroup_);
     this.bubbleGroup_ = null;
     this.bubbleArrow_ = null;
     this.bubbleBack_  = null;
     this.resizeGroup_ = null;
     this.workspace_   = null;
     this.content_     = null;
     this.shape_       = null;
 }
예제 #2
0
        /// <summary>
        /// Handle a mouse-down on bubble's resize corner.
        /// </summary>
        /// <param name="e">Mouse down event.</param>
        private void resizeMouseDown_(MouseEvent e)
        {
            this.promote_();
            Bubble.unbindDragEvents_();
            if (Core.isRightButton(e))
            {
                // No right-click.
                e.StopPropagation();
                return;
            }
            // Left-click (or middle click)
            Css.setCursor(Css.Cursor.CLOSED);

            this.workspace_.startDrag(e, new goog.math.Coordinate(
                                          this.workspace_.RTL ? -this.width_ : this.width_, this.height_));

            Bubble.onMouseUpWrapper_ = Core.bindEventWithChecks_(Document.Instance,
                                                                 "mouseup", null, new Action <MouseEvent>(Bubble.bubbleMouseUp_));
            Bubble.onMouseMoveWrapper_ = Core.bindEventWithChecks_(Document.Instance,
                                                                   "mousemove", this, new Action <MouseEvent>(this.resizeMouseMove_));
            Core.hideChaff();
            // This event has been handled.  No need to bubble up to the document.
            e.StopPropagation();
        }
예제 #3
0
 /// <summary>
 /// Handle a mouse-up event while dragging a bubble's border or resize handle.
 /// </summary>
 /// <param name="e">Mouse up event.</param>
 private static void bubbleMouseUp_(MouseEvent e)
 {
     Touch.clearTouchIdentifier();
     Css.setCursor(Css.Cursor.OPEN);
     Bubble.unbindDragEvents_();
 }