Handle document.mouseup event

@param {Event} e The DOM event to be handled
495644
function handleDocumentMouseup(e) {
  let svg;
  if (lines.length > 1 && (svg = findSVGAtPoint(e.clientX, e.clientY))) {
    let { documentId, pageNumber } = getMetadata(svg);

    PDFJSAnnotate.getStoreAdapter().addAnnotation(documentId, pageNumber, {
        type: 'drawing',
        width: _penSize,
        color: _penColor,
        lines
      }
    ).then((annotation) => {
      if (path) {
        svg.removeChild(path);
      }

      appendChild(svg, annotation);
    });
  }

  document.removeEventListener('mousemove', handleDocumentMousemove);
  document.removeEventListener('mouseup', handleDocumentMouseup);
}
81786
def mousePressEvent(self, e):
        
        self._selecting = True
        self._sel_start = e.pos().y()
        start = end = TextHelper(self.editor).line_nbr_from_position(
            self._sel_start)
        self._start_line = start
        TextHelper(self.editor).select_lines(start, end)
10309
function updateMouse(e) {
  input.mouse.clientX = e.clientX;
  input.mouse.clientY = e.clientY;
  input.mouse.buttons = e.buttons;
  if (e.type === 'mouseleave') input.mouse.mouseOnDocument = false;
  else input.mouse.mouseOnDocument = true;
}
846976
public void mousePressed (MouseEvent e)
    {
        // ignore if we're not enabled
        if (!isEnabled()) {
            return;
        }

        // keep track of the selected button
        _selectedButton = (JLabel)e.getSource();
        // if the selected button is already selected, ignore the click
        if (_selectedButton.getBorder() == SELECTED_BORDER) {
            _selectedButton = null;
        } else {
            _selectedButton.setBorder(SELECTED_BORDER);
            _selectedButton.repaint();
        }
    }
1183356
function(e) {
        var y = Event.getPageY(e);

        if (y < this.lastY) {
            this.goingUp = true;
        } else if (y > this.lastY) {
            this.goingUp = false;
        }

        this.lastY = y;
    }
770483
function handleDocumentKeyup(e) {
  // Cancel rect if Esc is pressed
  if (e.keyCode === 27) {
    lines = null;
    path.parentNode.removeChild(path);
    document.removeEventListener('mousemove', handleDocumentMousemove);
    document.removeEventListener('mouseup', handleDocumentMouseup);
  }
}
73449
function(e) {
			gui.broadcastGlobal(({
				"click": gui.BROADCAST_MOUSECLICK,
				"mousedown": gui.BROADCAST_MOUSEDOWN,
				"mouseup": gui.BROADCAST_MOUSEUP
			})[e.type], gui.$contextid);
		}
961534
function handleMouseMove(e) {
            epsilon || setEpsilon();

            let [xPosition, yPosition] = d3Selection.mouse(e),
                dataPoint = getNearestDataPoint(xPosition - margin.left),
                dataPointXPosition;

            if (dataPoint) {
                dataPointXPosition = xScale(new Date( dataPoint.key ));
                // Move verticalMarker to that datapoint
                moveVerticalMarker(dataPointXPosition);
                // Add data points highlighting
                highlightDataPoints(dataPoint);
                // Emit event with xPosition for tooltip or similar feature
                dispatcher.call('customMouseMove', e, dataPoint, categoryColorMap, dataPointXPosition, yPosition);
            }
        }
466203
function handleMouseMove (e) {
                    if(enabled){
                        if (pushed) {
                            if(!axis || axis === 'x') {
                                $element[0].scrollLeft -= (-lastClientX + (lastClientX = e.clientX));
                            }
                            if(!axis || axis === 'y') {
                                $element[0].scrollTop -= (-lastClientY + (lastClientY = e.clientY));
                            }
                        }

                        e.preventDefault();
                    }
                }
27943
private void prepareAndShowPopup(MouseEvent e)
    {
        prepareMenu(popupMenu, e.getComponent(), e.getX(), e.getY());
        popupMenu.show(e.getComponent(), e.getX(), e.getY());
    }
150090
function _pointMouseUp(e) {
        var self = e.target;

        self.focus();

        if (self.bezierEditor.dragElement) {
            self.bezierEditor.dragElement = null;
            self.bezierEditor._commitTimingFunction();
            self.bezierEditor._updateCanvas();
        }
    }
101883
function(e) {
      var p = this._getMouseEvtPos(e);
		var lx = p[0], ly = p[1], n = this.wires.length, w;
		for(var i = 0 ; i < n ; i++) {
			w = this.wires[i];
			var elx = w.element.offsetLeft, ely = w.element.offsetTop;
			// Check if the mouse is within the canvas boundaries
			if( lx >= elx && lx < elx+w.element.width && ly >= ely && ly < ely+w.element.height ) {
				var rx = lx-elx, ry = ly-ely; // relative to the canvas
				w.onClick(rx,ry);
			}
		}
	}
147356
function _scrollHandler(e) {
        // Document scrolls can be updated immediately. Any other scrolls
        // need to be updated on a timer to ensure the layout is correct.
        if (e.target === window.document) {
            redrawHighlights();
        } else {
            if (_remoteHighlight || _localHighlight) {
                window.setTimeout(redrawHighlights, 0);
            }
        }
    }
1360024
function(eventName, e) {
                // trigger event on MouseSystem itself
                this.trigger(eventName, e);

                // special case: MouseOver & MouseOut
                var over = this.over,
                    closest = e.target;
                if (eventName === "MouseMove" && over !== closest) {
                    // MouseOver target changed
                    // if old MouseOver target wasn't null, send MouseOut
                    if (over) {
                        e.eventName = "MouseOut";
                        e.target = over;
                        over.trigger("MouseOut", e);
                        e.eventName = "MouseMove";
                        e.target = closest;
                    }

                    // save new over entity
                    this.over = closest;

                    // if new MouseOver target isn't null, send MouseOver
                    if (closest) {
                        e.eventName = "MouseOver";
                        closest.trigger("MouseOver", e);
                        e.eventName = "MouseMove";
                    }
                }

                // TODO: move routing of events in future to controls system, make it similar to KeyboardSystem
                // try to find closest element that will also receive mouse event, whatever the event is
                if (closest) {
                    closest.trigger(eventName, e);
                }
            }
169475
function handleDocumentMouseup(e) {
  if (input || !findSVGAtPoint(e.clientX, e.clientY)) {
    return;
  }

  input = document.createElement('input');
  input.setAttribute('id', 'pdf-annotate-text-input');
  input.setAttribute('placeholder', 'Enter text');
  input.style.border = `3px solid ${BORDER_COLOR}`;
  input.style.borderRadius = '3px';
  input.style.position = 'absolute';
  input.style.top = `${e.clientY}px`;
  input.style.left = `${e.clientX}px`;
  input.style.fontSize = `${_textSize}px`;

  input.addEventListener('blur', handleInputBlur);
  input.addEventListener('keyup', handleInputKeyup);

  document.body.appendChild(input);
  input.focus();
}
836268
function (e)
	{
		var that = this, i, iLen, j;

		$(document).unbind('mousemove.AutoFill mouseup.AutoFill');

		this.dom.borderTop.style.display = "none";
		this.dom.borderRight.style.display = "none";
		this.dom.borderBottom.style.display = "none";
		this.dom.borderLeft.style.display = "none";

		this.s.drag.dragging = false;

		clearInterval( this.s.screen.interval );

		var cells = [];
		var table = this.dom.table;
		var coordsStart = this._fnTargetCoords( this.s.drag.startTd );
		var coordsEnd = this._fnTargetCoords( this.s.drag.endTd );
		var columnIndex = function ( visIdx ) {
			return that.s.dt.oApi._fnVisibleToColumnIndex( that.s.dt, visIdx );
		};

		// xxx - urgh - there must be a way of reducing this...
		if ( coordsStart.y <= coordsEnd.y ) {
			for ( i=coordsStart.y ; i<=coordsEnd.y ; i++ ) {
				if ( coordsStart.x <= coordsEnd.x ) {
					for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) {
						cells.push( {
							node:   $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0],
							x:      j - coordsStart.x,
							y:      i - coordsStart.y,
							colIdx: columnIndex( j )
						} );
					}
				}
				else {
					for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) {
						cells.push( {
							node:   $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0],
							x:      j - coordsStart.x,
							y:      i - coordsStart.y,
							colIdx: columnIndex( j )
						} );
					}
				}
			}
		}
		else {
			for ( i=coordsStart.y ; i>=coordsEnd.y ; i-- ) {
				if ( coordsStart.x <= coordsEnd.x ) {
					for ( j=coordsStart.x ; j<=coordsEnd.x ; j++ ) {
						cells.push( {
							node:   $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0],
							x:      j - coordsStart.x,
							y:      i - coordsStart.y,
							colIdx: columnIndex( j )
						} );
					}
				}
				else {
					for ( j=coordsStart.x ; j>=coordsEnd.x ; j-- ) {
						cells.push( {
							node:   $('tbody>tr:eq('+i+')>td:eq('+j+')', table)[0],
							x:      coordsStart.x - j,
							y:      coordsStart.y - i,
							colIdx: columnIndex( j )
						} );
					}
				}
			}
		}

		// An auto-fill requires 2 or more cells
		if ( cells.length <= 1 ) {
			return;
		}

		var edited = [];
		var previous;

		for ( i=0, iLen=cells.length ; i<iLen ; i++ ) {
			var cell      = cells[i];
			var column    = this.s.columns[ cell.colIdx ];
			var read      = column.read.call( column, cell.node );
			var stepValue = column.step.call( column, cell.node, read, previous, i, cell.x, cell.y );

			column.write.call( column, cell.node, stepValue );

			previous = stepValue;
			edited.push( {
				cell:     cell,
				colIdx:   cell.colIdx,
				newValue: stepValue,
				oldValue: read
			} );
		}

		if ( this.c.complete !== null ) {
			this.c.complete.call( this, edited );
		}

		// In 1.10 we can do a static draw
		if ( DataTable.Api ) {
			new DataTable.Api( this.s.dt ).draw( false );
		}
		else {
			this.s.dt.oInstance.fnDraw();
		}
	}
1301133
function handleMouseOver (e, d) {
            dispatcher.call('customMouseOver', e, d, d3Selection.mouse(e));
        }