Documentation ¶
Index ¶
- Variables
- func ReleaseMouseClickEvent()
- func ReleaseMouseDoubleClickEvent()
- func ReleaseMouseMoveListener()
- func ReleaseMousePressEvent()
- func ReleaseMouseUpEvent()
- func SetMouseClickEvent() js.Func
- func SetMouseDoubleClickEvent() js.Func
- func SetMouseDownEvent() js.Func
- func SetMouseMoveEvent() js.Func
- func SetMouseSimpleEventManager(manager SimpleManager) js.Func
- func SetMouseUpEvent() js.Func
- type CursorType
- type Event
- type MouseButton
- type MouseEvent
- func (e MouseEvent) GetAltKey() (altKey bool)
- func (e MouseEvent) GetButton() (mouseButton MouseButton)
- func (e MouseEvent) GetClientX() (clientX float64)
- func (e MouseEvent) GetClientY() (clientY float64)
- func (e MouseEvent) GetCtrlKey() (ctrlKey bool)
- func (e MouseEvent) GetMetaKey() (metaKey bool)
- func (e MouseEvent) GetMovementX() (movementX float64)
- func (e MouseEvent) GetMovementY() (movementY float64)
- func (e MouseEvent) GetOffsetX() (offsetX float64)
- func (e MouseEvent) GetOffsetY() (offsetY float64)
- func (e MouseEvent) GetPageX() (pageX float64)
- func (e MouseEvent) GetPageY() (pageY float64)
- func (e MouseEvent) GetRegion() (region string)
- func (e MouseEvent) GetRelatedTarget() (isNull bool, object js.Value)
- func (e MouseEvent) GetScreenX() (screenX float64)
- func (e MouseEvent) GetScreenY() (screenY float64)
- func (e MouseEvent) GetShiftKey() (shiftKey bool)
- func (e MouseEvent) GetX() (x float64)
- func (e MouseEvent) GetY() (y float64)
- type SimpleManager
Constants ¶
This section is empty.
Variables ¶
var X int
var Y int
Functions ¶
func ReleaseMouseClickEvent ¶
func ReleaseMouseClickEvent()
func ReleaseMouseDoubleClickEvent ¶
func ReleaseMouseDoubleClickEvent()
func ReleaseMouseMoveListener ¶
func ReleaseMouseMoveListener()
func ReleaseMousePressEvent ¶
func ReleaseMousePressEvent()
func ReleaseMouseUpEvent ¶
func ReleaseMouseUpEvent()
func SetMouseClickEvent ¶
SetMouseClickEvent
English:
Mouse click coupling function, passing (x, y) in mouse channel.BrowserMouseClickToPlatformMouseClickEvent
Português:
Função de acoplamento do clique do mouse, transmitindo (x, y) no canal mouse.BrowserMouseClickToPlatformMouseClickEvent
func SetMouseDoubleClickEvent ¶
SetMouseDoubleClickEvent
English:
Mouse double click coupling function, passing (x, y) in mouse channel.BrowserMouseDoubleClickToPlatformMouseDoubleClickEvent
Português:
Função de acoplamento do clique duplo do mouse, transmitindo (x, y) no canal mouse.BrowserMouseDoubleClickToPlatformMouseDoubleClickEvent
func SetMouseDownEvent ¶
SetMouseDownEvent
English:
Mouse down coupling function, passing (x, y) in mouse channel.BrowserMouseDownToPlatformMouseDownEvent
Português:
Função de acoplamento do mouse down, transmitindo (x, y) no canal mouse.BrowserMouseDownToPlatformMouseDownEvent
func SetMouseMoveEvent ¶
SetMouseMoveEvent
English:
Mouse move coupling function, passing (x, y) in mouse channel.BrowserMouseToPlatformMouseCoordinate
Português:
Função de acoplamento do mouse move, transmitindo (x, y) no canal mouse.BrowserMouseToPlatformMouseCoordinate
func SetMouseSimpleEventManager ¶
func SetMouseSimpleEventManager(manager SimpleManager) js.Func
SetMouseSimpleEventManager
English:
Registers a Golang function to fire when a mouse event happens. Input: manager: Golang function like func().
Português:
Registra uma função Golang para ser disparada quando um evento do mouse acontece. Entrada: manager: função Golang tipo func().
func SetMouseUpEvent ¶
SetMouseUpEvent
English:
Mouse up coupling function, passing (x, y) in mouse channel.BrowserMouseUpToPlatformMouseUpEvent
Português:
Função de acoplamento do mouse up, transmitindo (x, y) no canal mouse.BrowserMouseUpToPlatformMouseUpEvent
Types ¶
type CursorType ¶
type CursorType int
const ( // KCursorAuto // // English: // // Default. The browser sets a cursor // // Português: // // O navegador define o cursor KCursorAuto CursorType = iota // este valor sempre deve ser zero! // KCursorAlias // // English: // // The cursor indicates an alias of something is to be created // // Português: // // O cursor indica um atalho ou que algo pode ser criado KCursorAlias // KCursorAllScroll // // English: // // The cursor indicates that something can be scrolled in any direction // // Português: // // O cursor indica que algo pode ser corrido em qualquer direção KCursorAllScroll // KCursorCell // // English: // // The cursor indicates that a cell (or set of cells) may be selected // // Português: // // O cursor indica que uma célula ou conjunto de células pode ser selecionada KCursorCell // KCursorContextMenu // // English: // // The cursor indicates that a context-menu is available // // Português: // // O cursor indica que o menu de contexto está disponível KCursorContextMenu // KCursorColResize // // English: // // The cursor indicates that the column can be resized horizontally // // Português: // // O cursor indica que a coluna pode ser redimensionada horizontalmente KCursorColResize // KCursorCopy // // English: // // The cursor indicates something is to be copied // // Português: // // O cursor indica que algo pode ser copiado KCursorCopy // KCursorCrossHair // // English: // // The cursor render as a crosshair // // Português: // // O cursor é transformado em uma cruz KCursorCrossHair // KCursorDefault // // English: // // The default cursor // // Português: // // Cursor padrão KCursorDefault // KCursorEResize // // English: // // The cursor indicates that an edge of a box is to be moved right (east) // // Português: // // O cursor indica que uma borda pode ser movida a direita (oeste) KCursorEResize // KCursorEWResize // // English: // // Indicates a bidirectional resize cursor horizontal // // Português: // // O cursor indica um redimensionamento horizontal bidirecional KCursorEWResize // KCursorHelp // // English: // // The cursor indicates that help is available // // Português: // // O cursor indica que há uma ajuda disponível KCursorHelp // KCursorMove // // English: // // The cursor indicates something is to be moved // // Português: // // O cursor indica que algo pode ser movido KCursorMove // KCursorNResize // // English: // // The cursor indicates that an edge of a box is to be moved up (north) // // Português: // // O cursor indica que uma borda pode ser movida para cima (norte) KCursorNResize // KCursorNeResize // // English: // // The cursor indicates that an edge of a box is to be moved up and right (north/east) // // Português: // // O cursor indica que uma borda pode ser movida a direita (norte/oeste) KCursorNeResize // KCursorNESwResize // // English: // // Indicates a bidirectional resize cursor 45º right // // Português: // // O cursor indica um redimensionamento bidirecional 45º a direita KCursorNESwResize // KCursorNSResize // // English: // // Indicates a bidirectional resize cursor // // Português: // // O cursor indica um redimensionamento bidirecional KCursorNSResize // KCursorNwResize // // English: // // The cursor indicates that an edge of a box is to be moved up and left (north/west) // // Português: // // O cursor indica que um canto de uma caixa pode ser movida para cima e para a esquerda // (norte/oeste) KCursorNwResize // KCursorNWSeResize // // English: // // Indicates a bidirectional resize cursor // // Português: // // O cursor indica um redimensionamento bidirecional KCursorNWSeResize // KCursorNoDrop // // English: // // The cursor indicates that the dragged item cannot be dropped here // // Português: // // O cursor indica que um item arrastado não pode ser solto aqui KCursorNoDrop // KCursorNone // // English: // // No cursor is rendered for the element // // Português: // // Esconde o cursor KCursorNone // KCursorNotAllowed // // English: // // The cursor indicates that the requested action will not be executed // // Português: // // O cursor indica que a ação não pode ser executada KCursorNotAllowed // KCursorPointer // // English: // // The cursor is a pointer and indicates a link // // Português: // // O cursor é um ponteiro e indica um link KCursorPointer // KCursorProgress // // English: // // The cursor indicates that the program is busy (in progress) // // Português: // // O cursor indica que o programa está ocupado ou em progresso KCursorProgress // KCursorRowResize // // English: // // The cursor indicates that the row can be resized vertically // // Português: // // O cursor indica que uma linha pode ser redimensionada verticalmente KCursorRowResize // KCursorSResize // // English: // // The cursor indicates that an edge of a box is to be moved down (south) // // Português: // // O cursor indica que uma borda pode ser movida para baixo (sul) KCursorSResize // KCursorSeResize // // English: // // The cursor indicates that an edge of a box is to be moved down and right (south/east) // // Português: // // O cursor indica que um canto pode ser movida para baixo e direita (sul/oeste) KCursorSeResize // KCursorSwResize // // English: // // The cursor indicates that an edge of a box is to be moved down and left (south/west) // // Português: // // O cursor indica que um canto pode ser movido para baixo e esquerda (sul/oeste) KCursorSwResize // KCursorText // // English: // // The cursor indicates text that may be selected // // Português: // // O cursor indica que algo pode ser selecionado KCursorText // KCursorVerticalText // // English: // // The cursor indicates vertical-text that may be selected // // Português: // // O cursor indica que um texto vertical pode ser selecionado KCursorVerticalText // KCursorWResize // // English: // // The cursor indicates that an edge of a box is to be moved left (west) // // Português: // // O cursor indica que uma borda pode ser movida a esquerda (oeste) KCursorWResize // KCursorWait // // English: // // The cursor indicates that the program is busy // // Português: // // O cursor indica que o programa está ocupado KCursorWait // KCursorZoomIn // // English: // // The cursor indicates that something can be zoomed in // // Português: // // O cursor indica que algo pode receber zoom in KCursorZoomIn // KCursorZoomOut // // English: // // The cursor indicates that something can be zoomed out // // Português: // // O cursor indica que algo pode receber zoom out KCursorZoomOut )
func (CursorType) String ¶
func (el CursorType) String() string
type Event ¶
type Event string
Event
English:
Type referring to mouse events, such as click, move, up, down and others.
Português:
Tipo referente aos eventos do mouse, como click, move, up, down, etc.
const ( // KEventClick // // English: // // The event occurs when the user clicks on an element. // // Português: // // O evento acontece quando o usuário clica em um elemento. KEventClick Event = "click" // KEventContextMenu // // English: // // The event occurs when the user right-clicks on an element to open a context menu. // // Português: // // O evento acontece quando o usuário usa o clique direito para abrir o menu de contexto. KEventContextMenu Event = "contextmenu" // KEventDoubleClick // // English: // // The event occurs when the user double-clicks on an element. // // Português: // // O evento acontece quando o usuário dá dois cliques no elemento. KEventDoubleClick Event = "dblclick" // KEventMouseDown // // English: // // The event occurs when the user presses a mouse button over an element. // // Português: // // O evento acontece quando o usuário pressiona o botão do mouse em cima do elemento. KEventMouseDown Event = "mousedown" // KEventMouseEnter // // English: // // The event occurs when the pointer is moved onto an element. // // Português: // // O evento acontece quando o ponteiro do mouse é movido para um elemento KEventMouseEnter Event = "mouseenter" // KEventMouseLeave // // English: // // The event occurs when the pointer is moved out of an element. // // Português: // // O evento acontece quando o ponteiro do mouse é movido para fora do elemento. KEventMouseLeave Event = "mouseleave" // KEventMouseMove // // English: // // The event occurs when the pointer is moving while it is over an element. // // Português: // // O evento acontece durante o movimento do ponteiro do mouse em cima do elemento. KEventMouseMove Event = "mousemove" // KEventMouseOver // // English: // // The event occurs when the pointer is moved onto an element, or onto one of its children. // // Português: // // O evento acontece quando quando o ponteiro do mouse é movido para cima do elemento ou um de seus // elementos filhos. KEventMouseOver Event = "mouseover" // KEventMouseOut // // English: // // The event occurs when a user moves the mouse pointer out of an element, or out of one of its // children. // // Português: // // O evento acontece quando quando o ponteiro do mouse é movido para fora do elemento ou um de seus // elementos filhos. KEventMouseOut Event = "mouseout" // KEventMouseUp // // English: // // The event occurs when a user releases a mouse button over an element. // // Português: // // O evento acontece quando o usuário solta o botão do mouse em cima do elemento. KEventMouseUp Event = "mouseup" )
type MouseButton ¶
type MouseButton int
const ( // KMouseButtonNoButton // // English: // // No button or un-initialized. // // Português: // // Sem botão ou não inicializado. KMouseButtonNoButton MouseButton = 0 // KMouseButtonMain // // English: // // Main button pressed, usually the left button or the un-initialized state. // // Português: // // Botão principal pressionado, geralmente o botão esquerdo ou o estado não inicializado. KMouseButtonMain MouseButton = 1 // KMouseButtonAuxiliary // // English: // // Auxiliary button pressed, usually the wheel button or the middle button (if present). // // Português: // // Botão auxiliar pressionado, geralmente o botão da roda ou o botão do meio (se houver). KMouseButtonAuxiliary MouseButton = 2 // KMouseButtonSecondary // // English: // // Secondary button pressed, usually the right button. // // Português: // // Botão secundário pressionado, geralmente o botão direito. KMouseButtonSecondary MouseButton = 4 // KMouseButtonFourth // // English: // // Fourth button, typically the Browser Back button. // // Português: // // Quarto botão, normalmente o botão Voltar do navegador. KMouseButtonFourth MouseButton = 8 // KMouseButtonFifth // // English: // // Fifth button, typically the Browser Forward button. // // Português: // // Quinto botão, normalmente o botão Browser Forward. KMouseButtonFifth MouseButton = 16 )
type MouseEvent ¶
func (MouseEvent) GetAltKey ¶
func (e MouseEvent) GetAltKey() (altKey bool)
GetAltKey
English:
is a boolean value that indicates whether the alt key was pressed or not when a given mouse event occurs.
Be aware that the browser can't always detect the alt key on some operating systems.
On some Linux variants, for example, a left mouse click combined with the alt key is used to move or resize windows.
Note: * On Macintosh keyboards, this key is also known as the option key.
Português:
É um valor booleano que indica se a tecla alt foi pressionada ou não quando ocorre um determinado evento de mouse.
Esteja ciente de que o navegador nem sempre pode detectar a tecla alt em alguns sistemas operacionais.
Em algumas variantes do Linux, por exemplo, um clique esquerdo do mouse combinado com a tecla alt é usado para mover ou redimensionar janelas.
Nota: * Em teclados Macintosh, essa tecla também é conhecida como tecla de opção.
func (MouseEvent) GetButton ¶
func (e MouseEvent) GetButton() (mouseButton MouseButton)
GetButton
English:
Indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
Português:
Indica quais botões são pressionados no mouse (ou outro dispositivo de entrada) quando um evento de mouse é acionado.
func (MouseEvent) GetClientX ¶
func (e MouseEvent) GetClientX() (clientX float64)
GetClientX
English:
The clientX property of the MouseEvent interface provides the horizontal coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).
For example, clicking on the left edge of the viewport will always result in a mouse event with a clientX value of 0, regardless of whether the page is scrolled horizontally.
Português:
A propriedade clientX da interface MouseEvent fornece a coordenada horizontal na janela de visualização do aplicativo na qual o evento ocorreu (em oposição à coordenada na página).
Por exemplo, clicar na borda esquerda da janela de visualização sempre resultará em um evento de mouse com um valor clientX de 0, independentemente de a página ser rolada horizontalmente.
func (MouseEvent) GetClientY ¶
func (e MouseEvent) GetClientY() (clientY float64)
GetClientY
English:
The clientY read-only property of the MouseEvent interface provides the vertical coordinate within the application's viewport at which the event occurred (as opposed to the coordinate within the page).
For example, clicking on the top edge of the viewport will always result in a mouse event with a clientY value of 0, regardless of whether the page is scrolled vertically.
Português:
A propriedade somente leitura clientY da interface MouseEvent fornece a coordenada vertical na janela de visualização do aplicativo na qual o evento ocorreu (em oposição à coordenada na página).
Por exemplo, clicar na borda superior da janela de visualização sempre resultará em um evento de mouse com um valor clientY de 0, independentemente de a página ser rolada verticalmente.
func (MouseEvent) GetCtrlKey ¶
func (e MouseEvent) GetCtrlKey() (ctrlKey bool)
GetCtrlKey
English:
The MouseEvent.ctrlKey read-only property is a boolean value that indicates whether the ctrl key was pressed or not when a given mouse event occurs. Note: * On Macintosh keyboards, this key is the control key.
Português:
A propriedade somente leitura MouseEvent.ctrlKey é um valor booleano que indica se a tecla ctrl foi pressionada ou não quando ocorre um determinado evento de mouse. Nota: * Em teclados Macintosh, esta tecla é a tecla de controle.
func (MouseEvent) GetMetaKey ¶
func (e MouseEvent) GetMetaKey() (metaKey bool)
GetMetaKey
English:
Is a boolean value that indicates whether the meta key was pressed or not when a given mouse event occurs.
Be aware that many operating systems bind special functionality to the meta key, so this property may be false even when the key is actually pressed. On Windows, for example, this key may open the Start menu.
Note: * On Macintosh keyboards, this key is the command key (⌘). On Windows keyboards, this key is the Windows key (⊞).
Português:
É um valor booleano que indica se a tecla meta foi pressionada ou não quando ocorre um determinado evento de mouse.
Esteja ciente de que muitos sistemas operacionais vinculam funcionalidades especiais à meta-chave, portanto, essa propriedade pode ser falsa mesmo quando a tecla é realmente pressionada. No Windows, por exemplo, essa tecla pode abrir o menu Iniciar.
Nota: * Em teclados Macintosh, esta tecla é a tecla de comando (⌘). Em teclados Windows, esta tecla é a tecla Windows (⊞).
func (MouseEvent) GetMovementX ¶
func (e MouseEvent) GetMovementX() (movementX float64)
GetMovementX
English:
The movementX read-only property of the MouseEvent interface provides the difference in the X coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementX = currentEvent.screenX - previousEvent.screenX.
Português:
A propriedade somente leitura movementX da interface MouseEvent fornece a diferença na coordenada X do ponteiro do mouse entre o evento fornecido e o evento mousemove anterior. Em outras palavras, o valor da propriedade é calculado assim: currentEvent.movementX = currentEvent.screenX - previousEvent.screenX.
func (MouseEvent) GetMovementY ¶
func (e MouseEvent) GetMovementY() (movementY float64)
GetMovementY
English:
The movementY read-only property of the MouseEvent interface provides the difference in the Y coordinate of the mouse pointer between the given event and the previous mousemove event. In other words, the value of the property is computed like this: currentEvent.movementY = currentEvent.screenY - previousEvent.screenY.
Português:
A propriedade somente leitura movementY da interface MouseEvent fornece a diferença na coordenada Y do ponteiro do mouse entre o evento fornecido e o evento mousemove anterior. Em outras palavras, o valor da propriedade é calculado assim: currentEvent.movementY = currentEvent.screenY - previousEvent.screenY.
func (MouseEvent) GetOffsetX ¶
func (e MouseEvent) GetOffsetX() (offsetX float64)
GetOffsetX
English:
The offsetX read-only property of the MouseEvent interface provides the offset in the X coordinate of the mouse pointer between that event and the padding edge of the target node.
Português:
A propriedade somente leitura offsetX da interface MouseEvent fornece o deslocamento na coordenada X do ponteiro do mouse entre esse evento e a borda de preenchimento do nó de destino.
func (MouseEvent) GetOffsetY ¶
func (e MouseEvent) GetOffsetY() (offsetY float64)
GetOffsetY
English:
The offsetY read-only property of the MouseEvent interface provides the offset in the Y coordinate of the mouse pointer between that event and the padding edge of the target node.
Português:
A propriedade somente leitura offsetY da interface MouseEvent fornece o deslocamento na coordenada Y do ponteiro do mouse entre esse evento e a borda de preenchimento do nó de destino.
func (MouseEvent) GetPageX ¶
func (e MouseEvent) GetPageX() (pageX float64)
GetPageX
English:
The pageX read-only property of the MouseEvent interface returns the X (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document. This includes any portion of the document not currently visible.
Being based on the edge of the document as it is, this property takes into account any horizontal scrolling of the page. For example, if the page is scrolled such that 200 pixels of the left side of the document are scrolled out of view, and the mouse is clicked 100 pixels inward from the left edge of the view, the value returned by pageX will be 300.
Originally, this property was defined as a long integer. The CSSOM View Module redefined it as a double float. See the Browser compatibility section for details.
See Page in Coordinate systems for some additional information about coordinates specified in this fashion.
Output: pageX: A floating-point number of pixels from the left edge of the document at which the mouse was clicked, regardless of any scrolling or viewport positioning that may be in effect. This property was originally specified in the Touch Events specification as a long integer, but was redefined in the CSSOM View Module to be a double-precision floating-point number to allow for subpixel precision. Even though numeric types both are represented by Number in JavaScript, they may be handled differently internally in the browser's code, resulting in potential behavior differences. See Browser compatibility to learn which browsers have been updated to use the revised data type.
Português:
A propriedade somente leitura pageX da interface MouseEvent retorna a coordenada X (horizontal) (em pixels) na qual o mouse foi clicado, em relação à borda esquerda do documento inteiro. Isso inclui qualquer parte do documento não visível no momento.
Baseando-se na borda do documento como está, essa propriedade leva em consideração qualquer rolagem horizontal da página. Por exemplo, se a página for rolada de forma que 200 pixels do lado esquerdo do documento sejam rolados para fora da visualização e o mouse for clicado 100 pixels para dentro da borda esquerda da visualização, o valor retornado por pageX será 300.
Originalmente, essa propriedade foi definida como um inteiro longo. O CSSOM View Module o redefiniu como um float duplo. Consulte a seção Compatibilidade do navegador para obter detalhes.
Consulte Página em sistemas de coordenadas para obter algumas informações adicionais sobre as coordenadas especificadas desta forma.
Saída: pageX: Um número de pixels de ponto flutuante da borda esquerda do documento em que o mouse foi clicado, independentemente de qualquer rolagem ou posicionamento da janela de visualização que possa estar em vigor. Essa propriedade foi originalmente especificada na especificação Touch Events como um inteiro longo, mas foi redefinida no CSSOM View Module para ser um número de ponto flutuante de precisão dupla para permitir a precisão de subpixel. Embora ambos os tipos numéricos sejam representados por Number em JavaScript, eles podem ser tratados de forma diferente internamente no código do navegador, resultando em possíveis diferenças de comportamento. Consulte Compatibilidade do navegador para saber quais navegadores foram atualizados para usar o tipo de dados revisado.
func (MouseEvent) GetPageY ¶
func (e MouseEvent) GetPageY() (pageY float64)
GetPageY
English:
The pageY read-only property of the MouseEvent interface returns the Y (vertical) coordinate in pixels of the event relative to the whole document. This property takes into account any vertical scrolling of the page. Output: pageY: A double floating point value.
Português:
A propriedade somente leitura pageY da interface MouseEvent retorna a coordenada Y (vertical) em pixels do evento em relação do documento inteiro.
Esta propriedade leva em consideração qualquer rolagem vertical da página.
Saída: pageY: Um valor de ponto flutuante duplo.
func (MouseEvent) GetRegion ¶
func (e MouseEvent) GetRegion() (region string)
GetRegion
English:
The MouseEvent.region read-only property returns the id of the canvas hit region affected by the event. If no hit region is affected, null is returned. Output: region: A DOMString representing the id of the hit region.
Português:
A propriedade somente leitura MouseEvent.region retorna o id da região de acerto da tela afetada pelo evento. Se nenhuma região de hit for afetada, null será retornado. Saída: region: Um DOMString que representa o id da região do hit.
func (MouseEvent) GetRelatedTarget ¶
func (e MouseEvent) GetRelatedTarget() (isNull bool, object js.Value)
GetRelatedTarget
English:
The MouseEvent.relatedTarget read-only property is the secondary target for the mouse event, if there is one.
In practice, it returns the html element of the target. Like, if the target is a div, it returns the div with all its attributes.
Example: func move(event browserMouse.MouseEvent) { isNull, target := event.GetRelatedTarget() if isNull == false { log.Print("id: ", target.Get("id")) } }
Português:
A propriedade somente leitura MouseEvent.relatedTarget é o destino secundário para o evento de mouse, se houver.
Na prática, ele retorna o elemento html do destino. Tipo, se o alvo for um div, ele retorna o div com todos os seus atributos.
Exemplo: func move(event browserMouse.MouseEvent) { isNull, target := event.GetRelatedTarget() if isNull == false { log.Print("id: ", target.Get("id")) } }
func (MouseEvent) GetScreenX ¶
func (e MouseEvent) GetScreenX() (screenX float64)
GetScreenX
English:
The screenX read-only property of the MouseEvent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates. Note: * In a multiscreen environment, screens aligned horizontally will be treated as a single device, and so the range of the screenX value will increase to the combined width of the screens.
Português:
A propriedade somente leitura screenX da interface MouseEvent fornece a coordenada horizontal (deslocamento) do ponteiro do mouse em coordenadas globais (tela). Nota: * Em um ambiente de várias telas, as telas alinhadas horizontalmente serão tratadas como um único dispositivo e, portanto, o intervalo do valor screenX aumentará para a largura combinada das telas.
func (MouseEvent) GetScreenY ¶
func (e MouseEvent) GetScreenY() (screenY float64)
GetScreenY
English:
The screenY read-only property of the MouseEvent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
Português:
A propriedade somente leitura screenY da interface MouseEvent fornece a coordenada vertical (deslocamento) do ponteiro do mouse em coordenadas globais (tela).
func (MouseEvent) GetShiftKey ¶
func (e MouseEvent) GetShiftKey() (shiftKey bool)
GetShiftKey
English:
The MouseEvent.shiftKey read-only property is a boolean value that indicates whether the shift key was pressed or not when a given mouse event occurs.
Português:
A propriedade somente leitura MouseEvent.shiftKey é um valor booleano que indica se a tecla shift foi pressionada ou não quando ocorre um determinado evento de mouse.
func (MouseEvent) GetX ¶
func (e MouseEvent) GetX() (x float64)
GetX
English:
The MouseEvent.x property is an alias for the MouseEvent.clientX property.
Português:
A propriedade MouseEvent.x é um alias para a propriedade MouseEvent.clientX.
func (MouseEvent) GetY ¶
func (e MouseEvent) GetY() (y float64)
GetY
English:
The MouseEvent.y property is an alias for the MouseEvent.clientY property.
Português:
A propriedade MouseEvent.y é um alias para a propriedade MouseEvent.clientY.
type SimpleManager ¶
type SimpleManager func(event MouseEvent)