CN109933251A - A kind of method and apparatus changing object element state - Google Patents
A kind of method and apparatus changing object element state Download PDFInfo
- Publication number
- CN109933251A CN109933251A CN201711375311.6A CN201711375311A CN109933251A CN 109933251 A CN109933251 A CN 109933251A CN 201711375311 A CN201711375311 A CN 201711375311A CN 109933251 A CN109933251 A CN 109933251A
- Authority
- CN
- China
- Prior art keywords
- mouse pointer
- object element
- motion profile
- state
- positional relationship
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention discloses a kind of method and apparatus for changing object element state, are related to field of computer technology.One specific embodiment of this method includes: the motion profile for obtaining mouse pointer;Based on motion profile, the positional relationship of mouse pointer and object element is judged;When positional relationship reaches specified requirements, change the state of object element.Which overcomes have to mouse pointer the technical issues of could triggering change condition Chong Die with the position of object element in the prior art, reach the motion profile according to mouse pointer, the positional relationship of mouse pointer and object element is judged in advance, so that triggering object element changes the technical effect of state in advance.
Description
Technical field
The present invention relates to field of computer technology more particularly to a kind of method and apparatus for changing object element state.
Background technique
In computer man-machine interacting system, when mouse pointer is moved on object element, object element can be triggered
State makes its state change, and the change of object element state be in computer interactive process for guide user into
What one step was operated.
Currently, being the relationship by judging mouse pointer position Yu object element position, if mouse pointer position and target
Element position overlaps, then determines that the state of object element needs to change.
In realizing process of the present invention, at least there are the following problems in the prior art for inventor's discovery:
During interaction, user is needed accurately to control mouse pointer, it is made to overlap with object element position,
It just can trigger object element and change state, reduce user experience.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and apparatus for changing object element state, it is able to solve existing
Have and need accurately to control mouse pointer in technology and the problem of could triggering corresponding operating of overlapping with object element position,
Improve user experience.
To achieve the above object, according to an aspect of an embodiment of the present invention, a kind of change object element state is provided
Method.
A kind of method of change object element state of the embodiment of the present invention includes: the motion profile for obtaining mouse pointer;
Based on motion profile, the positional relationship of mouse pointer and object element is judged;When positional relationship reaches specified requirements, change mesh
Mark the state of element.
An embodiment according to the present invention, the present invention are being based on motion profile, are judging the position of mouse pointer and object element
Before the step of setting relationship, further includes: obtain the coordinate value of object element from the page;According to the coordinate value of object element, really
Make the target frame of object element.
The step of embodiment according to the present invention, the present invention obtains the motion profile of mouse pointer includes: acquisition mouse
Coordinate value and mouse pointer moving direction relative to object element of the pointer in the time endpoint of unit time;According to list
The coordinate value of position time and mouse pointer determines the movement speed of mouse pointer, with the movement speed and mouse of mouse pointer
The moving direction of pointer is motion profile;After the step of obtaining the motion profile of mouse pointer further include: in mouse pointer
Moving direction extended line on, according to the movement speed of mouse pointer generate virtual box;Or, centered on mouse pointer, root
Virtual box is generated according to the movement speed of mouse pointer.
An embodiment according to the present invention, the present invention change the shape of object element when positional relationship reaches specified requirements
The step of state includes: the motion profile according to mouse pointer, judges virtual box by generating according to mouse pointer and by according to mesh
Whether the target frame of mark Element generation overlaps;If virtual box overlaps with target frame, change the shape of object element
State.
To achieve the above object, according to another aspect of an embodiment of the present invention, a kind of change object element state is provided
Device.
A kind of device of change object element state of the embodiment of the present invention includes: acquisition module, is referred to for obtaining mouse
The motion profile of needle;Judgment module judges the positional relationship of mouse pointer and object element for being based on motion profile;Processing
Module, for changing the state of object element when positional relationship reaches specified requirements.
An embodiment according to the present invention, the invention also includes determining modules, are used for: object element is obtained from the page
Coordinate value;According to the coordinate value of object element, the target frame of object element is determined.
An embodiment according to the present invention, acquisition module of the invention are also used to: obtaining mouse pointer in the unit time
Moving direction of the coordinate value and mouse pointer of time endpoint relative to object element;Referred to according to unit time and mouse
The coordinate value of needle determines the movement speed of mouse pointer, and the moving direction with the movement speed of mouse pointer and mouse pointer is
Motion profile;Further include generation module, be used for: in the extended line of the moving direction of mouse pointer, according to the shifting of mouse pointer
Dynamic speed generates virtual box;Or, generating virtual box according to the movement speed of mouse pointer centered on mouse pointer.
An embodiment according to the present invention, processing module of the invention are also used to: according to the motion profile of mouse pointer, being sentenced
Whether the disconnected virtual box by being generated according to mouse pointer and the target frame by being generated according to object element overlap;If virtual
Frame overlaps with target frame, then changes the state of object element.
To achieve the above object, in accordance with a further aspect of the present invention, a kind of electronic equipment is provided.
The a kind of electronic equipment of the embodiment of the present invention includes: one or more processors;Storage device, for storing one
Or multiple programs, when one or more programs are executed by one or more processors, so that one or more processors realize this
The method that invention changes object element state.
To achieve the above object, in accordance with a further aspect of the present invention, a kind of computer readable storage medium is provided.
A kind of computer readable storage medium of the embodiment of the present invention, is stored thereon with computer program, which is characterized in that
Realize that the present invention changes the method for object element state when program is executed by processor.
One embodiment in foregoing invention has the following advantages that or the utility model has the advantages that because using the fortune according to mouse pointer
The positional relationship of dynamic rail mark and object element is to determine whether trigger change condition, to change the technology hand of object element state
Section, has to the mouse pointer skill that could trigger change condition Chong Die with the position of object element so overcoming in the prior art
Art problem, and then reach the motion profile according to mouse pointer, the positional relationship of mouse pointer and object element is judged in advance, is mentioned
Preceding triggering object element changes the technical effect of state.Embodiment through the invention can be reduced and precisely be operated to user
Requirement, and reduce the time cost of user's operation, promote user experience.
Further effect possessed by above-mentioned non-usual optional way adds hereinafter in conjunction with specific embodiment
With explanation.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment
Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for
For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other
Attached drawing.In the accompanying drawings:
Fig. 1 is the schematic diagram of the main flow of the method according to an embodiment of the present invention for changing object element state;
Fig. 2 is the concrete operations schematic diagram according to an embodiment of the present invention for changing object element state;
Fig. 3 is the schematic diagram of the main modular of the device according to an embodiment of the present invention for changing object element state;
Fig. 4 is that the embodiment of the present invention can be applied to exemplary system architecture figure therein;
Fig. 5 is adapted for the structural representation of the computer system for the terminal device or server of realizing the embodiment of the present invention
Figure.
Specific embodiment
Below in conjunction with attached drawing, an exemplary embodiment of the present invention will be described, including the various of the embodiment of the present invention
Details should think them only exemplary to help understanding.Therefore, those of ordinary skill in the art should recognize
It arrives, it can be with various changes and modifications are made to the embodiments described herein, without departing from scope and spirit of the present invention.Together
Sample, for clarity and conciseness, descriptions of well-known functions and structures are omitted from the following description.
Fig. 1 is the schematic diagram of the main flow of the method according to an embodiment of the present invention for changing object element state, such as Fig. 1
Shown, a kind of method of change object element state of the embodiment of the present invention mainly includes the following steps:
Step S101: the motion profile of mouse pointer is obtained.Purport of the invention is exactly the movement rail by mouse pointer
Mark judges the positional relationship of mouse pointer and object element in advance, triggers the purpose that object element changes state in advance.Therefore,
In an embodiment of the present invention, need to obtain mouse pointer in the coordinate value and mouse pointer of the time endpoint of unit time
Moving direction relative to object element;The movement of mouse pointer is determined according to the coordinate value of unit time and mouse pointer
Speed, using the moving direction of the movement speed of mouse pointer and mouse pointer as motion profile.
It should be noted that the present invention can not only judge in advance according to the motion profile of mouse pointer, may be used also
To generate a virtual box on mouse pointer, thus the target frame generated according to the virtual box and object element or object element
Judged.Therefore, after the step of obtaining the motion profile of mouse pointer further include: in the moving direction of mouse pointer
On extended line, virtual box is generated according to the movement speed of mouse pointer;Or, centered on mouse pointer, according to mouse pointer
Movement speed generates virtual box.Specifically, the virtual box is a virtual polygon frame, in the mistake for generating the virtual polygon frame
Cheng Zhong is determined according to the movement speed of mouse pointer, the area of virtual polygon frame and the movement speed of mouse pointer
At certain ratio, specific generating process will be repeated no more in subsequent elaboration with this.It should be noted that virtual more
When shape frame includes at least three, subsequent judgement for convenience in the application, selection be four edges rectangle frame, i.e., virtually
Rectangle frame.
In addition it is also necessary to the information of object element be obtained, to generate the mesh of object element according to the information of object element
Mark frame.Therefore, the present invention also wraps before the step of being based on motion profile, judging the positional relationship of mouse pointer and object element
It includes: obtaining the coordinate value of object element from the page;According to the coordinate value of object element, the target frame of object element is determined.
Specifically, the target frame is the polygon frame using multiple coordinate values as endpoint, it should be noted that in embodiments herein
Subsequent judgement for convenience is then to generate one by endpoint of outermost four coordinate values centered on multiple coordinate values
A rectangle frame, i.e., the target frame in the application are a rectangle frames.
Step S102: it is based on motion profile, judges the positional relationship of mouse pointer and object element.It is obtained by step S101
The motion profile of mouse pointer has been got, then anticipation can have been made according to the motion profile of mouse pointer in advance, judged
The positional relationship of mouse pointer and object element, to judge whether that needing to trigger object element changes state;The application's
It is whether the target frame that generates with object element of virtual box generated by mouse pointer overlaps and judged in embodiment
, when virtual box and target frame overlap, then reach the condition that triggering object element changes state, to change target element
The state of element.
Step S103: when positional relationship reaches specified requirements, change the state of object element.Pass through the position of step S102
After setting relationship judgement, when reaching the condition of triggering object element change state, change the state of object element.In the application
Embodiment in, when positional relationship reaches specified requirements, the step of changing the state of object element includes: according to mouse pointer
Motion profile, judge whether the virtual box by generating according to mouse pointer and the target frame by generating according to object element occur
Overlapping;After virtual box and target frame overlap, change the state of object element.
Fig. 2 is the concrete operations schematic diagram according to an embodiment of the present invention for changing object element state.The application is in user
During mobile mouse pointer, by calculating a virtual box associated with the direction in mouse pointer moving process, speed,
And the behavior of user is predicted by virtual box and the positional relationship of object element, object element is triggered in advance changes state, with
Achieve the purpose that the induction region for expanding object element and reduces the requirement precisely operated to user.
As shown in Fig. 2, the specific implementation process of the application is divided into the following steps:
1, the coordinate (A1, B1) at four angles of object element, (A1, B2), (A2, B1), (A2, B2) are obtained.It uses
JavaScript language called from the document document object of browser interdependent node operating method (such as:
GetElementById, getElementsByTagName, querySelector etc., concrete condition are regarded by the section of operation button
Point attribute is different and different from), object element is obtained from the result of page final rendering according to the method for calling, goes forward side by side one
Step is supplied to the clientWidth attribute, clientHeight attribute, offsetLeft attribute of DOM element object from browser
And in offsetTop attribute, the coordinate at four angles of object element is got respectively, since the upper left corner in the direction of the clock,
It is denoted as (A1, B1) respectively, (A2, B1), (A2, B2), (A1, B2), thus the coordinate at four angles constitutes the target of object element
Frame.
2, the coordinate (X0, Y0) of mouse pointer, the coordinate (X1, Y1) of the mouse pointer after movement are obtained.It uses
JavaScript language calls addEventListener method to monitor the page from the document document object of browser
Mouse pointer moving event (mousemove event), and from event object obtain mouse pointer initial coordinate, be denoted as (X0,
Y0), at the end of next time cycle, using same method, the coordinate of the mouse pointer after being moved, be denoted as (X1,
Y1), a time cycle is defined as the frequency of renewal of the page, every hertz of unit time when with 60 hertz being standard, i.e., and 1000
Millisecond/60, about 16.17 milliseconds, are denoted as time T.
3, movement speed V of the mouse pointer within the unit time is calculated.The movement speed V=S/T of mouse pointer is calculated,
In,
4, the coordinate (C1, D1) at four angles of the virtual box that calculating mouse pointer generates, (C1, D2), (C2, D1), (C2,
D2).On the extended line of the moving direction of mouse pointer, virtual box, speedometer specifically mobile according to mouse pointer are generated
The coordinate of the virtual box is calculated, the coordinate at four obtained angle is (C1, D1), (C1, D2), (C2, D1), (C2, D2);Wherein,
C1=X1+kV, D1=C1* [(Y1-Y0)/(X1-X0)], C2=C1+L, D2=D1+L;K is speed weight coefficient, is one big
In 0 constant, L is virtual box side length setting value, is a constant greater than 1.
5, the relationship being overlapped according to position triggers object element suspended state.Judge whether virtual box and target frame occur
Overlapping changes the state of target element if overlapping.The coordinate of coordinate and object element frame by virtual rectangle virtual box (can also
To regard the coordinate of object element as) judge whether virtual rectangle virtual box overlaps with object element frame, specific judgement side
Method is as follows: whether there is (A1≤C1≤A2 or A1≤C2≤A2) and (B1≤D1≤B2 or B1≤D2≤B2), if it is present
It is judged as that virtual rectangle virtual box is Chong Die with object element frame generation position, it is suspended state that triggering object element, which changes state,;
It does not overlap if it does not exist, then being judged as, does not trigger object element and change state.It should be noted that object element changes
Change state, which can be, to be changed by other states to floating state.
The method according to an embodiment of the present invention for changing object element state can be seen that because using according to mouse pointer
Motion profile and object element positional relationship to determine whether triggering change condition, to change the skill of object element state
Art means have to that mouse pointer is Chong Die with the position of object element could to trigger change condition so overcoming in the prior art
The technical issues of, and then reach the motion profile according to mouse pointer, judge that the position of mouse pointer and object element is closed in advance
System triggers the technical effect that object element changes state in advance.Embodiment through the invention can reduce accurate to user
The requirement of operation, and reduce the time cost of user's operation, promote user experience.
Fig. 3 is the schematic diagram of the main modular of the device according to an embodiment of the present invention for changing object element state.Such as Fig. 3
Shown, the device 300 of the change object element state of the embodiment of the present invention, which specifically includes that, obtains module 301, judgment module 302
And processing module 303, in which:
Module 301 is obtained, for obtaining the motion profile of mouse pointer;Judgment module 302, for being based on motion profile,
Judge the positional relationship of mouse pointer and object element;Processing module 303, for changing when positional relationship reaches specified requirements
Become the state of object element.
An embodiment according to the present invention, the invention also includes determining module (not shown)s, are used for: obtaining from the page
Take the coordinate value of object element;According to the coordinate value of object element, the target frame of object element is determined.Existed using mouse pointer
Related data tectonic movement track in moving process, and pass through the position that the motion profile judges mouse pointer and object element
Relationship, so that triggering object element changes state in advance.
An embodiment according to the present invention, acquisition module 301 of the invention are also used to: obtaining mouse pointer in the unit time
Time endpoint moving direction relative to object element of coordinate value and mouse pointer;According to unit time and mouse
The coordinate value of pointer determines the movement speed of mouse pointer, with the moving direction of the movement speed of mouse pointer and mouse pointer
For motion profile;Further include generation module (not shown), be used for: in the extended line of the moving direction of mouse pointer, root
Virtual box is generated according to the movement speed of mouse pointer;Or, being generated centered on mouse pointer according to the movement speed of mouse pointer
Virtual box.
In addition, processing module 303 of the invention is also used to: according to the motion profile of mouse pointer, judging by according to mouse
Whether the virtual box of Pointer generator and the target frame by being generated according to object element overlap;If virtual box and target frame are sent out
Raw overlapping, then change the state of object element.
From the above, it can be seen that because using according to the motion profile of mouse pointer and the positional relationship of object element
To determine whether triggering change condition in the prior art must to change the technological means of object element state so overcoming
Need mouse pointer the technical issues of could triggering change condition Chong Die with the position of object element, and then reach and referred to according to mouse
The motion profile of needle judges the positional relationship of mouse pointer and object element in advance, triggers object element in advance and changes state
Technical effect.Embodiment through the invention can reduce the requirement precisely operated to user, and reduce user's operation
Time cost, promoted user experience.
Fig. 4 is shown can be using the method or change object element shape of the change object element state of the embodiment of the present invention
The exemplary system architecture 400 of the device of state.
As shown in figure 4, system architecture 400 may include terminal device 401,402,403, network 404 and server 405.
Network 404 between terminal device 401,402,403 and server 405 to provide the medium of communication link.Network 404 can be with
Including various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be used terminal device 401,402,403 and be interacted by network 404 with server 405, to receive or send out
Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 401,402,403
(merely illustrative) such as the application of page browsing device, searching class application, instant messaging tools, mailbox client, social platform softwares.
Terminal device 401,402,403 can be the various electronic equipments with display screen and supported web page browsing, packet
Include but be not limited to smart phone, tablet computer, pocket computer on knee and desktop computer etc..
Server 405 can be to provide the server of various services, such as utilize terminal device 401,402,403 to user
The shopping class website browsed provides the back-stage management server (merely illustrative) supported.Back-stage management server can be to reception
To the data such as information query request analyze etc. processing, and by processing result (such as target push information, product letter
Breath -- merely illustrative) feed back to terminal device.
It should be noted that changing the method for object element state provided by the embodiment of the present invention generally by server
405 execute, and correspondingly, the device for changing object element state is generally positioned in server 405.
It should be understood that the number of terminal device, network and server in Fig. 4 is only schematical.According to realization need
It wants, can have any number of terminal device, network and server.
Below with reference to Fig. 5, it illustrates the computer systems 500 for the terminal device for being suitable for being used to realize the embodiment of the present invention
Structural schematic diagram.Terminal device shown in Fig. 5 is only an example, function to the embodiment of the present invention and should not use model
Shroud carrys out any restrictions.
As shown in figure 5, computer system 500 includes central processing unit (CPU) 501, it can be read-only according to being stored in
Program in memory (ROM) 502 or be loaded into the program in random access storage device (RAM) 503 from storage section 508 and
Execute various movements appropriate and processing.In RAM 503, also it is stored with system 500 and operates required various programs and data.
CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 is also connected to always
Line 504.
I/O interface 505 is connected to lower component: the importation 506 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 507 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 508 including hard disk etc.;
And the communications portion 509 of the network interface card including LAN card, modem etc..Communications portion 509 via such as because
The network of spy's net executes communication process.Driver 510 is also connected to I/O interface 505 as needed.Detachable media 511, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 510, in order to read from thereon
Computer program be mounted into storage section 508 as needed.
Particularly, disclosed embodiment, the process described above with reference to flow chart may be implemented as counting according to the present invention
Calculation machine software program.For example, embodiment disclosed by the invention includes a kind of computer program product comprising be carried on computer
Computer program on readable medium, the computer program include the program code for method shown in execution flow chart.?
In such embodiment, which can be downloaded and installed from network by communications portion 509, and/or from can
Medium 511 is dismantled to be mounted.When the computer program is executed by central processing unit (CPU) 501, system of the invention is executed
The above-mentioned function of middle restriction.
It should be noted that computer-readable medium shown in the present invention can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer readable storage medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination.Meter
The more specific example of calculation machine readable storage medium storing program for executing can include but is not limited to: have the electrical connection, just of one or more conducting wires
Taking formula computer disk, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In the present invention, computer readable storage medium can be it is any include or storage journey
The tangible medium of sequence, the program can be commanded execution system, device or device use or in connection.And at this
In invention, computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.Include on computer-readable medium
Program code can transmit with any suitable medium, including but not limited to: wireless, electric wire, optical cable, RF etc. are above-mentioned
Any appropriate combination.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of above-mentioned module, program segment or code include one or more
Executable instruction for implementing the specified logical function.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are practical
On can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it wants
It is noted that the combination of each box in block diagram or flow chart and the box in block diagram or flow chart, can use and execute rule
The dedicated hardware based systems of fixed functions or operations is realized, or can use the group of specialized hardware and computer instruction
It closes to realize.
Being described in module involved in the embodiment of the present invention can be realized by way of software, can also be by hard
The mode of part is realized.Described module also can be set in the processor, for example, can be described as: a kind of processor packet
Include acquisition module, judgment module and processing module.Wherein, the title of these modules is not constituted under certain conditions to the mould
The restriction of block itself.
As on the other hand, the present invention also provides a kind of computer-readable medium, which be can be
Included in equipment described in above-described embodiment;It is also possible to individualism, and without in the supplying equipment.Above-mentioned calculating
Machine readable medium carries one or more program, when said one or multiple programs are executed by the equipment, makes
Obtaining the equipment includes: the motion profile for obtaining mouse pointer;Based on motion profile, the position of mouse pointer and object element is judged
Relationship;When positional relationship reaches specified requirements, change the state of object element.
Technical solution according to an embodiment of the present invention, because using according to the motion profile of mouse pointer and object element
Positional relationship is to determine whether trigger change condition, to change the technological means of object element state, so overcoming existing
Mouse pointer the technical issues of could triggering change condition Chong Die with the position of object element is had in technology, and then reaches root
According to the motion profile of mouse pointer, the positional relationship of mouse pointer and object element is judged in advance, is triggered object element in advance and is changed
The technical effect of change state.Embodiment through the invention can reduce the requirement precisely operated to user, and reduce
The time cost of user's operation promotes user experience.
Above-mentioned specific embodiment, does not constitute a limitation on the scope of protection of the present invention.Those skilled in the art should be bright
It is white, design requirement and other factors are depended on, various modifications, combination, sub-portfolio and substitution can occur.It is any
Made modifications, equivalent substitutions and improvements etc. within the spirit and principles in the present invention, should be included in the scope of the present invention
Within.
Claims (10)
1. a kind of method for changing object element state characterized by comprising
Obtain the motion profile of mouse pointer;
Based on the motion profile, the positional relationship of the mouse pointer and object element is judged;
When the positional relationship reaches specified requirements, change the state of the object element.
2. judging the mouse the method according to claim 1, wherein being based on the motion profile described
Before the step of positional relationship of pointer and object element, further includes:
The coordinate value of object element is obtained from the page;
According to the coordinate value of the object element, the target frame of the object element is determined.
3. the method according to claim 1, wherein
The step of motion profile for obtaining mouse pointer includes: to obtain the mouse pointer in the time endpoint of unit time
Moving direction relative to the object element of coordinate value and the mouse pointer;According to the unit time and institute
The coordinate value for stating mouse pointer determines the movement speed of the mouse pointer, with the movement speed of the mouse pointer and described
The moving direction of mouse pointer is the motion profile;
After the motion profile for obtaining mouse pointer the step of further include: prolong in the moving direction of the mouse pointer
On long line, virtual box is generated according to the movement speed of the mouse pointer;Or, centered on the mouse pointer, according to described
The movement speed of mouse pointer generates virtual box.
4. changing the method according to claim 1, wherein described when the positional relationship reaches specified requirements
The step of becoming the state of the object element include:
According to the motion profile of the mouse pointer, virtual box as generating according to the mouse pointer is judged and as according to
Whether the target frame that object element generates overlaps;
If the virtual box overlaps with the target frame, change the state of the object element.
5. a kind of device for changing object element state characterized by comprising
Module is obtained, for obtaining the motion profile of mouse pointer;
Judgment module judges the positional relationship of the mouse pointer and object element for being based on the motion profile;
Processing module, for changing the state of the object element when the positional relationship reaches specified requirements.
6. device according to claim 5, which is characterized in that further include determining module, be used for:
The coordinate value of the object element is obtained from the page;
According to the coordinate value of the object element, the target frame of the object element is determined.
7. device according to claim 5, which is characterized in that
The module that obtains is also used to: obtaining the coordinate value of time endpoint of the mouse pointer in the unit time and described
Moving direction of the mouse pointer relative to the object element;According to the unit time and the coordinate value of the mouse pointer
The movement speed of the mouse pointer is determined, with the moving direction of the movement speed of the mouse pointer and the mouse pointer
For the motion profile;
Further include generation module, be used for: in the extended line of the moving direction of the mouse pointer, according to the mouse pointer
Movement speed generates virtual box;Or, being generated according to the movement speed of the mouse pointer virtual centered on the mouse pointer
Frame.
8. device according to claim 5, which is characterized in that the processing module is also used to:
According to the motion profile of the mouse pointer, virtual box as generating according to the mouse pointer is judged and as according to
Whether the target frame that object element generates overlaps;
If the virtual box overlaps with the target frame, change the state of the object element.
9. a kind of electronic equipment characterized by comprising
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now method as described in any in claim 1-4.
10. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that described program is held by processor
The method as described in any in claim 1-4 is realized when row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711375311.6A CN109933251A (en) | 2017-12-19 | 2017-12-19 | A kind of method and apparatus changing object element state |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711375311.6A CN109933251A (en) | 2017-12-19 | 2017-12-19 | A kind of method and apparatus changing object element state |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109933251A true CN109933251A (en) | 2019-06-25 |
Family
ID=66983672
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711375311.6A Pending CN109933251A (en) | 2017-12-19 | 2017-12-19 | A kind of method and apparatus changing object element state |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109933251A (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1648838A (en) * | 2004-01-27 | 2005-08-03 | 日本电气株式会社 | Information apparatus and method of selecting operation selecting element |
KR20060112112A (en) * | 2005-04-26 | 2006-10-31 | 엘지전자 주식회사 | Method for offer menu with interface of moving object in mobile terminal |
CN101980191A (en) * | 2010-10-14 | 2011-02-23 | 优视科技有限公司 | Method and device for locking focus element in webpage browsing process |
CN102270052A (en) * | 2010-06-03 | 2011-12-07 | 索尼公司 | Control system, control apparatus, handheld apparatus, control method and program |
CN102981707A (en) * | 2011-11-14 | 2013-03-20 | 微软公司 | Self-adaptive area cursor |
CN104718524A (en) * | 2012-08-31 | 2015-06-17 | 日本电气方案创新株式会社 | Input control device, thin-client system, input control method, and recording medium |
CN106547421A (en) * | 2015-09-23 | 2017-03-29 | 浙江格林蓝德信息技术有限公司 | Instruction input method and device based on cursor event |
CN106775204A (en) * | 2009-01-19 | 2017-05-31 | 三星电子株式会社 | Display information control device and method |
-
2017
- 2017-12-19 CN CN201711375311.6A patent/CN109933251A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1648838A (en) * | 2004-01-27 | 2005-08-03 | 日本电气株式会社 | Information apparatus and method of selecting operation selecting element |
KR20060112112A (en) * | 2005-04-26 | 2006-10-31 | 엘지전자 주식회사 | Method for offer menu with interface of moving object in mobile terminal |
CN106775204A (en) * | 2009-01-19 | 2017-05-31 | 三星电子株式会社 | Display information control device and method |
CN102270052A (en) * | 2010-06-03 | 2011-12-07 | 索尼公司 | Control system, control apparatus, handheld apparatus, control method and program |
CN101980191A (en) * | 2010-10-14 | 2011-02-23 | 优视科技有限公司 | Method and device for locking focus element in webpage browsing process |
CN102981707A (en) * | 2011-11-14 | 2013-03-20 | 微软公司 | Self-adaptive area cursor |
CN104718524A (en) * | 2012-08-31 | 2015-06-17 | 日本电气方案创新株式会社 | Input control device, thin-client system, input control method, and recording medium |
CN106547421A (en) * | 2015-09-23 | 2017-03-29 | 浙江格林蓝德信息技术有限公司 | Instruction input method and device based on cursor event |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109739478A (en) | Front end project automated construction method, device, storage medium and electronic equipment | |
CN108984714A (en) | Page rendering method, apparatus, electronic equipment and computer-readable medium | |
CN107844371A (en) | Task processing method, system and electronic equipment | |
CN110109979A (en) | A kind of allocation list radio button method and apparatus | |
CN109271403A (en) | A kind of operating method of data query, device, medium and electronic equipment | |
US10148790B2 (en) | Deployment of integrative HTML-based engine from an edge server | |
CN112783394A (en) | List page display method and device | |
CN109857388A (en) | Code generating method, device, server and computer-readable medium | |
CN110020376A (en) | Data linkage method and system | |
CN109558323A (en) | For debugging system, the method and apparatus of the page | |
CN110020304A (en) | A kind of method and apparatus of loading page | |
CN109961331A (en) | Page processing method and its system, computer system and readable storage medium storing program for executing | |
CN109783101A (en) | The page layout method and device of browser automatic adaptation | |
CN109582317A (en) | Method and apparatus for debugging boarding application | |
CN114115681A (en) | Page generation method and device, electronic equipment and medium | |
CN109002282A (en) | A kind of method and apparatus for realizing animation effect in web page exploitation | |
CN109101294A (en) | Collecting method and plug-in unit, electronic equipment and storage medium | |
CN109992177A (en) | User interaction approach, system, electronic equipment and the computer media of electronic equipment | |
CN109960212A (en) | Task sending method and device | |
CN106649299A (en) | Method and device for lazy loading of webpage block | |
CN110020349A (en) | The method and device of page rendering | |
CN107515947A (en) | picture loading method and its system | |
CN109857473A (en) | A kind of loading method and device of page data | |
CN107741970A (en) | Method and apparatus for being laid out to homepage | |
CN108985673A (en) | It makes an inventory single generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190625 |