Method, related storage medium, equipment and device for achieving mouse event penetration

A mouse event and mouse technology, applied in the field of Internet development, can solve the problems of blocking the lower layer from receiving events, unable to respond to mouse events, and unable to realize functions.

Inactive Publication Date: 2018-07-20
WUHAN DOUYU NETWORK TECH CO LTD
View PDF7 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the Canvas element is a whole rectangular area, even if no object is drawn in it, it will occupy the entire space. In this way, other page elements under the Canvas element will not be able to receive all mouse events because the Canvas has received all mouse events on it. In response to mouse events, many common functions cannot be implemented: such as mouse hand shape, click, etc.
[0003] And when three DOM elements are stacked, the middle is Canvas (Canvas is a DOM element as a whole), and there are some sub-elements (non-DOM) inside Canvas, the traditional solution can only control whether the entire part of the middle Canvas responds or does not respond Mouse events cannot be distinguished according to the content in the Canvas, and can only be set to respond to the hand shape as a whole. At the same time, the transparent part in the Canvas will also block the lower layer from receiving events

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, related storage medium, equipment and device for achieving mouse event penetration
  • Method, related storage medium, equipment and device for achieving mouse event penetration
  • Method, related storage medium, equipment and device for achieving mouse event penetration

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Apparently, the described embodiment is one embodiment of the present invention, but not all of them. Based on the described embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0039] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the usual meanings understood by those skilled in the art to which the present invention belongs.

[0040] According to one aspect of the present invention, a method for realizing mouse event penetration is provided, and the specific implementation idea is as ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention provides a method for achieving mouse event penetration. The method comprises the steps that S1, it is detected whether or not an upper layer DOM element exists; S2, if the upperlayer DOM element exist, a CSS attribute of a Canvas element layer is set, so that the Canvas element layer does not respond to a mouse event, and at this time, the upper layer DOM element responds to the mouse event; if the upper layer DOM element does not exist, step S3 is performed; S3, the position of a mouse coordinate is detected; S4, if the mouse coordinate is in the scope of sub-elementsof the Canvas element layer, CSS attributes of the sub-elements are set, so that the sub-elements respond to the mouse event; if the position of the mouse coordinate is not in the scope of sub-elements of the Canvas element layer, a CSS attribute of the Canvas element layer is set, so that the Canvas element layer does not respond to the mouse event, and at this time, a lower layer DOM element responds to the mouse event. The invention further relates to a related computer readable storage medium, electronic equipment, and computing device.

Description

technical field [0001] The invention relates to the field of Internet development, in particular to a method for realizing mouse event penetration, related computer-readable storage media, electronic equipment and computing devices. Background technique [0002] With the popularization of HTML5 technology, the Canvas element (which can be understood as a canvas on which various graphics can be drawn through the API) has been more and more widely used due to its strong expressiveness and excellent performance. However, the Canvas element is a whole rectangular area, even if no object is drawn in it, it will occupy the entire space. In this way, other page elements under the Canvas element will not be able to receive all mouse events because the Canvas has received all mouse events on it. In response to mouse events, many common functions cannot be implemented: such as mouse hand shape, click, etc. [0003] And when three DOM elements are stacked, the middle is Canvas (Canvas...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/451G06F8/38
CPCG06F8/38
Inventor 王兴伟张文明陈少杰
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products