CN111158568A - Method and device for realizing draggable page element and computer readable storage medium - Google Patents
Method and device for realizing draggable page element and computer readable storage medium Download PDFInfo
- Publication number
- CN111158568A CN111158568A CN201911356355.3A CN201911356355A CN111158568A CN 111158568 A CN111158568 A CN 111158568A CN 201911356355 A CN201911356355 A CN 201911356355A CN 111158568 A CN111158568 A CN 111158568A
- Authority
- CN
- China
- Prior art keywords
- dimension
- size
- distance
- frame
- updating
- 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
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0486—Drag-and-drop
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the invention discloses a method and a device for realizing draggable page elements and a computer readable storage medium, wherein the method comprises the following steps: dividing the second page elements into M parts by adopting N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1; mouse presses down in the position that is on a parallel with the first page element place of the frame A of browser, just the in-process that mouse removed in direction B, according to the first distance adjustment that mouse removed in direction B the display position of the first page element of the frame A that is on a parallel with the browser, according to first distance is adjusted respectively in the second page element with the content that shows in each part that is on a parallel with the first page element of the frame A of browser is adjacent. The embodiment of the invention realizes the dragability of the second page element based on the first page element, thereby improving the experience of the user.
Description
Technical Field
Embodiments of the present invention relate to, but not limited to, the field of computers, and in particular, to a method and an apparatus for implementing draggable page elements, and a computer-readable storage medium.
Background
With the continuous development of big data, the amount of information required to be displayed on a website interface is larger and larger, sometimes, different page elements are required to be used for displaying different contents when a plurality of parts of contents are required to be displayed simultaneously for comparison, because the size of the page elements is unchangeable in the browsing process of a user, if the amount of information of the contents required to be displayed is larger, the interface is crowded, the user may not browse the complete displayed contents, and the user experience is lower. For example, if an interface needs to simultaneously display text content and a chart obtained by text analysis, two different page elements need to be used to respectively display the text content and the chart, and because the interface space is limited and the size of the page elements cannot be changed in the browsing process, the displayed text content and chart may only display a small part, which results in a user being very arduous in browsing, and thus the user experience is low.
Disclosure of Invention
The embodiment of the invention provides a method and a device for realizing draggable page elements and a computer readable storage medium, which can realize draggable property of the page elements, thereby improving user experience.
The embodiment of the invention provides a method for realizing draggable page elements, which comprises the following steps:
dividing the second page elements into M parts by adopting N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1;
mouse presses down in the position that is on a parallel with the first page element place of the frame A of browser, just the in-process that mouse removed in direction B, according to the first distance adjustment that mouse removed in direction B the display position of the first page element of the frame A that is on a parallel with the browser, according to first distance is adjusted respectively in the second page element with the content that shows in each part that is on a parallel with the first page element of the frame A of browser is adjacent.
In an embodiment of the present invention, the method further includes:
when the mouse is detected to be pressed at the position where the first page element parallel to the frame A of the browser is located, modifying the dragging possibility state of the second page element into dragging possibility state;
and when the mouse is detected to be lifted, modifying the state of the second page element whether to be dragged into a non-dragging state.
In an embodiment of the present invention, the separately adjusting the content displayed in each of the portions of the second page element adjacent to the first page element parallel to the frame a of the browser includes:
for each portion of the second page element adjacent to the first page element parallel to the browser's bezel A, updating the size of dimension C of the portion according to the first distance;
adjusting content shown in the portion according to the size of the updated dimension C of the portion.
In this embodiment of the present invention, when the frame a is a top frame or a bottom frame, the direction B is upward, and the dimension C is height, the portion includes a first portion and a second portion, and the updating the size of the dimension C of the portion according to the first distance includes any one or a combination of more of the following:
subtracting the first distance from the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the first part; adding a second difference to the size of the dimension C of the second part before updating to obtain the size of the dimension C of the second part after updating; wherein the second difference is a difference between the size of the dimension C of the first portion before updating and the minimum value of the dimension C;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is greater than or equal to the minimum value of the dimension C, taking the first difference as the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
In this embodiment of the present invention, when the frame a is a top frame or a bottom frame, the direction B is downward, and the dimension C is height, the portion includes a first portion and a second portion, and the updating the size of the dimension C of the portion according to the first distance includes any one or a combination of more of the following:
subtracting the first distance from the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the updated dimension C of the second part; adding a fourth difference to the size of the dimension C of the first part before updating to obtain the size of the dimension C of the first part after updating; wherein the fourth difference is a difference between the size of the dimension C of the second portion before updating and the minimum value of the dimension C;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is greater than or equal to the minimum value of the dimension C, taking the third difference as the size of the updated dimension C of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the updated dimension C of the first part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
In this embodiment of the present invention, when the frame a is a left frame or a right frame, the direction B is left, and the dimension C is a width, the portion includes a third portion and a fourth portion, and the updating the size of the dimension C of the portion according to the first distance includes any one or a combination of more of the following:
subtracting the first distance from the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the third part; adding a sixth difference to the dimension C of the fourth part before updating to obtain the dimension C of the fourth part after updating; wherein the sixth difference is a difference between the size of the dimension C of the third portion before updating and the minimum value of the dimension C;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is greater than or equal to the minimum value of the dimension C, taking the fifth difference as the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
In this embodiment of the present invention, when the frame a is a left frame or a right frame, the direction B is a right direction, and the dimension C is a width, the portion includes a third portion and a fourth portion, and the updating the size of the dimension C of the portion according to the first distance includes any one or a combination of more of the following:
subtracting the first distance from the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part, and adding the first distance to the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C before updating of the fourth portion is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the fourth portion; adding an eighth difference to the size of the dimension C of the third part before updating to obtain the size of the dimension C of the third part after updating; wherein the eighth difference is a difference between the size of the dimension C of the third portion before update and the minimum value of the dimension C;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C of the fourth portion before updating is greater than or equal to the minimum value of the dimension C, taking the seventh difference as the size of the dimension C of the fourth portion after updating, and adding the first distance to the size of the dimension C of the third portion before updating to obtain the size of the dimension C of the third portion after updating;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
In an embodiment of the present invention, the adjusting the display position of the first page element parallel to the frame a of the browser according to the first distance moved by the mouse in the direction B includes:
updating a second distance between the first page element parallel to the frame A of the browser and the frame A of the browser according to the first distance;
displaying the first page element parallel to the browser's frame A at the updated second distance.
In the embodiment of the present invention, when the frame a is a top frame, the direction B is upward; or, the frame a is a left frame, and the direction B is leftward; or, the frame a is a bottom frame, and the direction B is downward; or, when the frame a is a right frame, and the direction B is rightward, the updating of the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser according to the first distance includes any one or more of:
subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the browser frame A is larger than the minimum value of the dimension C, subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the browser frame A is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and subtracting the change value from the second distance before updating to obtain the updated second distance; wherein the change value is an absolute value of a difference between the size of the dimension C before update and the minimum value of the dimension C of the portion of the dimension C of which the size is the minimum value of the dimension C.
In the embodiment of the present invention, when the frame a is a top frame, the direction B is downward; or, the frame a is a left frame, and the direction B is a right frame; or, the frame a is a bottom frame, and the direction B is upward; or, when the frame a is a right frame, and the direction B is leftward, the updating, according to the first distance, the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser includes any one or more of:
adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the frame A of the browser is larger than the minimum value of the dimension C, adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the frame A of the browser is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and adding the change value to the second distance before updating to obtain the updated second distance.
The embodiment of the invention provides a device for realizing draggable page elements, which comprises a processor and a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the instructions are executed by the processor, any one of the above methods for realizing draggable page elements is realized.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements any of the above steps of implementing a method for dragging a page element.
The embodiment of the invention comprises the following steps: dividing the second page elements into M parts by adopting N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1; mouse presses down in the position that is on a parallel with the first page element place of the frame A of browser, just the in-process that mouse removed in direction B, according to the first distance adjustment that mouse removed in direction B the display position of the first page element of the frame A that is on a parallel with the browser, according to first distance is adjusted respectively in the second page element with the content that shows in each part that is on a parallel with the first page element of the frame A of browser is adjacent. The embodiment of the invention realizes the dragability of the second page element based on the first page element, thereby improving the experience of the user.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of embodiments of the invention. The objectives and other advantages of the embodiments of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the examples of the invention serve to explain the principles of the embodiments of the invention and not to limit the embodiments of the invention.
FIG. 1 is a flowchart of a method for implementing draggable page elements according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for implementing draggable page elements according to an exemplary embodiment of the present invention;
FIG. 3 is a diagram illustrating adjusting content displayed by portions of a second page element in an example according to an embodiment of the invention;
fig. 4 is a schematic structural composition diagram of an apparatus for implementing draggable page elements according to another embodiment of the present invention.
Detailed Description
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. It should be noted that the embodiments and features of the embodiments of the present invention may be arbitrarily combined with each other without conflict.
The steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
Referring to fig. 1, an embodiment of the present invention provides a method for implementing draggable page elements, including:
step 100, dividing a second page element into M parts by adopting N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1.
In the embodiment of the present invention, the display position of the first page element parallel to the frame a of the browser may be first adjusted according to a first distance that the mouse moves in the direction B, and then the content displayed in each portion of the second page element adjacent to the first page element parallel to the frame a of the browser may be respectively adjusted according to the first distance; the content displayed in each part of the second page element adjacent to the first page element parallel to the frame a of the browser may be respectively adjusted according to the first distance, and then the display position of the first page element parallel to the frame a of the browser is adjusted according to the first distance that the mouse moves in the direction B; the embodiment of the present invention is not limited thereto.
In one illustrative example, the adjusting the content respectively presented in each of the second page elements adjacent to the first page element parallel to the browser's bezel a includes:
for each portion of the second page element adjacent to the first page element parallel to the browser's bezel A, updating the size of dimension C of the portion according to the first distance;
adjusting content shown in the portion according to the size of the updated dimension C of the portion.
In the process that the mouse is pressed at the position where the first page element parallel to the frame a of the browser is located, and the mouse moves in the direction B, the content displayed in each part of the second page element adjacent to the first page element parallel to the frame a of the browser by the adjustment may be performed for a plurality of times, the more the number of times of adjustment, the smaller the time interval between two adjacent adjustments, the better the user looks coherent, and the feeling is that the content changes in real time along with the movement of the mouse.
The following is a detailed description according to the size of the update dimension C under various conditions of the frame a, the direction B, and the dimension C.
When the frame A is a top frame or a bottom frame, the direction B is upward, and the dimension C is height, the portion includes a first portion and a second portion, and the updating of the size of the dimension C of the portion according to the first distance includes any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the first part; adding a second difference to the size of the dimension C of the second part before updating to obtain the size of the dimension C of the second part after updating; wherein the second difference is a difference between the size of the dimension C of the first portion before updating and the minimum value of the dimension C;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is greater than or equal to the minimum value of the dimension C, taking the first difference as the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(II) when the frame A is a top frame or a bottom frame, the direction B is downward, the portion comprises a first portion and a second portion, and the dimension C is height, the updating of the size of the dimension C of the portion according to the first distance comprises any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the updated dimension C of the second part; adding a fourth difference to the size of the dimension C of the first part before updating to obtain the size of the dimension C of the first part after updating; wherein the fourth difference is a difference between the size of the dimension C of the second portion before updating and the minimum value of the dimension C;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is greater than or equal to the minimum value of the dimension C, taking the third difference as the size of the updated dimension C of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the updated dimension C of the first part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(III) when the frame A is a left frame or a right frame, the direction B is leftward, and the dimension C is a width, the part includes a third part and a fourth part, and updating the dimension C of the part according to the first distance includes any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the third part; adding a sixth difference to the dimension C of the fourth part before updating to obtain the dimension C of the fourth part after updating; wherein the sixth difference is a difference between the size of the dimension C of the third portion before updating and the minimum value of the dimension C;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is greater than or equal to the minimum value of the dimension C, taking the fifth difference as the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(IV) when the frame A is a left frame or a right frame, the direction B is the right, and the dimension C is the width, the part comprises a third part and a fourth part, and updating the dimension C of the part according to the first distance comprises any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part, and adding the first distance to the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C before updating of the fourth portion is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the fourth portion; adding an eighth difference to the size of the dimension C of the third part before updating to obtain the size of the dimension C of the third part after updating; wherein the eighth difference is a difference between the size of the dimension C of the third portion before update and the minimum value of the dimension C;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C of the fourth portion before updating is greater than or equal to the minimum value of the dimension C, taking the seventh difference as the size of the dimension C of the fourth portion after updating, and adding the first distance to the size of the dimension C of the third portion before updating to obtain the size of the dimension C of the third portion after updating;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
In an exemplary example, adjusting the display position of the first page element parallel to the browser's bezel a according to the first distance the mouse moves in the direction B includes:
updating a second distance between the first page element parallel to the frame A of the browser and the frame A of the browser according to the first distance;
displaying the first page element parallel to the browser's frame A at the updated second distance.
In the process that the mouse is pressed at the position where the first page element parallel to the frame A of the browser is located, and the mouse moves in the direction B, the display position of the first page element parallel to the frame A of the browser can be adjusted for multiple times, the more the adjustment times are, the smaller the time interval between two adjacent adjustments is, the better the user looks coherent, and the user feels that the change is in real time along with the movement of the mouse.
The following is a detailed description according to the size of the update dimension C under various conditions of the frame a, the direction B, and the dimension C.
When the frame A is a top frame, the direction B is upward; or, the frame a is a left frame, and the direction B is leftward; or, the frame a is a bottom frame, and the direction B is downward; or, when the frame a is a right frame, and the direction B is rightward, the updating of the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser according to the first distance includes any one or more of:
subtracting the first distance from the second distance before updating to obtain the updated second distance; this case does not limit the size of dimension C;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the browser frame A is larger than the minimum value of the dimension C, subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the browser frame A is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and subtracting the change value from the second distance before updating to obtain the updated second distance; wherein the change value is an absolute value of a difference between the size of the dimension C before update and the minimum value of the dimension C of the portion of the dimension C of which the size is the minimum value of the dimension C.
The latter two cases define that the first page element parallel to the browser's border a will not change when the size of dimension C reaches a minimum.
(II) when the frame A is a top frame, the direction B is downward; or, the frame a is a left frame, and the direction B is a right frame; or, the frame a is a bottom frame, and the direction B is upward; or, when the frame a is a right frame, and the direction B is leftward, the updating, according to the first distance, the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser includes any one or more of:
adding the first distance to the second distance before updating to obtain the updated second distance; this case does not limit the size of dimension C;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the frame A of the browser is larger than the minimum value of the dimension C, adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the frame A of the browser is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and adding the change value to the second distance before updating to obtain the updated second distance.
The latter two cases define that the first page element parallel to the browser's border a will not change when the size of dimension C reaches a minimum.
In another embodiment of the present invention, the method further comprises:
when the mouse is detected to be pressed at the position where the first page element parallel to the frame A of the browser is located, modifying the dragging possibility state of the second page element into dragging possibility state;
and when the mouse is detected to be lifted, modifying the state of the second page element whether to be dragged into a non-dragging state.
In the method, in the initialization state, the dragging enabled state of the second page element, the width and height of each part of the second page element, and the second distance between the first page element and the top border, the left border, the bottom border, or the right border of the browser may be set by using a configuration file, and during the mouse movement process, the updated values of the parameters may also be recorded and updated by using the configuration file.
The embodiment of the invention realizes the dragability of the second page element based on the first page element, thereby improving the experience of the user.
The following description is given to illustrate the specific implementation of the present application by way of a specific example, which is provided for the purpose of illustration only and is not intended to limit the scope of the present application.
Examples of the invention
Referring to fig. 2, the method includes:
and 200, setting whether the second page element can be dragged or not in the initial state to be not dragged.
Another embodiment of the present invention provides an apparatus for implementing draggable page elements, including a processor and a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed by the processor, the method for implementing draggable page elements is implemented.
Another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, performs any of the above-mentioned steps of the method for implementing draggable page elements.
Referring to fig. 4, another embodiment of the present invention provides an apparatus for implementing draggable page elements, including:
a dividing module 401, configured to divide the second page element into M parts by using N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1;
adjusting module 402 for the mouse is pressed at the position that is on a parallel with the first page element of the frame a of the browser, just the in-process that the mouse moved on direction B, according to the first distance adjustment that the mouse moved on direction B the display position of the first page element of the frame a that is on a parallel with the browser, according to first distance is adjusted respectively in the second page element with the content that shows in each part that is on a parallel with the first page element of the frame a of the browser is adjacent.
In this embodiment of the present invention, the adjusting module 402 may first adjust the display position of the first page element parallel to the frame a of the browser according to a first distance that the mouse moves in the direction B, and then respectively adjust the content displayed in each portion of the second page element adjacent to the first page element parallel to the frame a of the browser according to the first distance; the content displayed in each part of the second page element adjacent to the first page element parallel to the frame a of the browser may be respectively adjusted according to the first distance, and then the display position of the first page element parallel to the frame a of the browser is adjusted according to the first distance that the mouse moves in the direction B; the embodiment of the present invention is not limited thereto.
In an exemplary example, the adjusting module 402 is specifically configured to implement the following method for respectively adjusting the content shown in each of the portions of the second page element adjacent to the first page element parallel to the browser frame a:
for each portion of the second page element adjacent to the first page element parallel to the browser's bezel A, updating the size of dimension C of the portion according to the first distance;
adjusting content shown in the portion according to the size of the updated dimension C of the portion.
In the process that the mouse is pressed at the position where the first page element parallel to the frame a of the browser is located, and the mouse moves in the direction B, the content displayed in each part of the second page element adjacent to the first page element parallel to the frame a of the browser by the adjustment may be performed for a plurality of times, the more the number of times of adjustment, the smaller the time interval between two adjacent adjustments, the better the user looks coherent, and the feeling is that the content changes in real time along with the movement of the mouse.
The following is a detailed description according to the size of the update dimension C under various conditions of the frame a, the direction B, and the dimension C.
(one) when the frame a is a top frame or a bottom frame, the direction B is upward, and the dimension C is height, the portion includes a first portion and a second portion, and the adjusting module 402 is specifically configured to update the size of the dimension C of the portion according to the first distance by using any one or more of the following manners:
subtracting the first distance from the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the first part; adding a second difference to the size of the dimension C of the second part before updating to obtain the size of the dimension C of the second part after updating; wherein the second difference is a difference between the size of the dimension C of the first portion before updating and the minimum value of the dimension C;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is greater than or equal to the minimum value of the dimension C, taking the first difference as the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(ii) when the frame a is a top frame or a bottom frame, the direction B is downward, and the dimension C is height, the portion includes a first portion and a second portion, and the adjusting module 402 is specifically configured to update the size of the dimension C of the portion according to the first distance by using any one or more of the following manners:
subtracting the first distance from the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the updated dimension C of the second part; adding a fourth difference to the size of the dimension C of the first part before updating to obtain the size of the dimension C of the first part after updating; wherein the fourth difference is a difference between the size of the dimension C of the second portion before updating and the minimum value of the dimension C;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is greater than or equal to the minimum value of the dimension C, taking the third difference as the size of the updated dimension C of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the updated dimension C of the first part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(iii) when the frame a is a left frame or a right frame, the direction B is leftward, and the dimension C is a width, the portion includes a third portion and a fourth portion, and the adjusting module 402 is specifically configured to update the dimension C of the portion according to the first distance by using any one or more of the following manners:
subtracting the first distance from the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the third part; adding a sixth difference to the dimension C of the fourth part before updating to obtain the dimension C of the fourth part after updating; wherein the sixth difference is a difference between the size of the dimension C of the third portion before updating and the minimum value of the dimension C;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is greater than or equal to the minimum value of the dimension C, taking the fifth difference as the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
(IV) when the frame A is a left frame or a right frame, the direction B is the right, and the dimension C is the width, the section includes a third section and a fourth section, and the adjusting module 402 is specifically configured to update the dimension C of the section according to the first distance by using any one or more of the following manners:
subtracting the first distance from the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part, and adding the first distance to the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C before updating of the fourth portion is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the fourth portion; adding an eighth difference to the size of the dimension C of the third part before updating to obtain the size of the dimension C of the third part after updating; wherein the eighth difference is a difference between the size of the dimension C of the third portion before update and the minimum value of the dimension C;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C of the fourth portion before updating is greater than or equal to the minimum value of the dimension C, taking the seventh difference as the size of the dimension C of the fourth portion after updating, and adding the first distance to the size of the dimension C of the third portion before updating to obtain the size of the dimension C of the third portion after updating;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
The first condition does not limit the size of the dimension C, the latter two conditions limit the minimum value of the dimension C, and when the minimum value of the dimension C is smaller than the minimum value of the dimension C, the size of the dimension C of the part is taken as the minimum value of the dimension C, so that the abnormal display caused by the undersize of the dimension C is prevented.
In an exemplary example, the adjusting module 402 is specifically configured to implement the following method for adjusting the display position of the first page element parallel to the browser frame a according to the first distance moved by the mouse in the direction B:
updating a second distance between the first page element parallel to the frame A of the browser and the frame A of the browser according to the first distance;
displaying the first page element parallel to the browser's frame A at the updated second distance.
In the process that the mouse is pressed at the position where the first page element parallel to the frame A of the browser is located, and the mouse moves in the direction B, the display position of the first page element parallel to the frame A of the browser can be adjusted for multiple times, the more the adjustment times are, the smaller the time interval between two adjacent adjustments is, the better the user looks coherent, and the user feels that the change is in real time along with the movement of the mouse.
The following is a detailed description according to the size of the update dimension C under various conditions of the frame a, the direction B, and the dimension C.
When the frame A is a top frame, the direction B is upward; or, the frame a is a left frame, and the direction B is leftward; or, the frame a is a bottom frame, and the direction B is downward; or, when the frame a is a right frame, and the direction B is rightward, the adjusting module 402 is specifically configured to update the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser according to the first distance in any one or more of the following manners:
subtracting the first distance from the second distance before updating to obtain the updated second distance; this case does not limit the size of dimension C;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the browser frame A is larger than the minimum value of the dimension C, subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the browser frame A is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and subtracting the change value from the second distance before updating to obtain the updated second distance; wherein the change value is an absolute value of a difference between the size of the dimension C before update and the minimum value of the dimension C of the portion of the dimension C of which the size is the minimum value of the dimension C.
The latter two cases define that the first page element parallel to the browser's border a will not change when the size of dimension C reaches a minimum.
(II) when the frame A is a top frame, the direction B is downward; or, the frame a is a left frame, and the direction B is a right frame; or, the frame a is a bottom frame, and the direction B is upward; or, when the frame a is a right frame, and the direction B is a left frame, the adjusting module 402 is specifically configured to update the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser according to the first distance in any one or more of the following manners:
adding the first distance to the second distance before updating to obtain the updated second distance; this case does not limit the size of dimension C;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the frame A of the browser is larger than the minimum value of the dimension C, adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the frame A of the browser is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and adding the change value to the second distance before updating to obtain the updated second distance.
The latter two cases define that the first page element parallel to the browser's border a will not change when the size of dimension C reaches a minimum.
In another embodiment of the present invention, the adjusting module 402 is further configured to:
when the mouse is detected to be pressed at the position where the first page element parallel to the frame A of the browser is located, modifying the dragging possibility state of the second page element into dragging possibility state;
and when the mouse is detected to be lifted, modifying the state of the second page element whether to be dragged into a non-dragging state.
In the method, in the initialization state, the dragging enabled state of the second page element, the width and height of each part of the second page element, and the second distance between the first page element and the top border, the left border, the bottom border, or the right border of the browser may be set by using a configuration file, and during the mouse movement process, the updated values of the parameters may also be recorded and updated by using the configuration file.
The embodiment of the invention realizes the dragability of the second page element based on the first page element, thereby improving the experience of the user.
It will be understood by those of ordinary skill in the art that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
Although the embodiments of the present invention have been described above, the descriptions are only used for understanding the embodiments of the present invention, and are not intended to limit the embodiments of the present invention. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the embodiments of the invention as defined by the appended claims.
Claims (12)
1. A method for realizing draggable page elements comprises the following steps:
dividing the second page elements into M parts by adopting N first page elements; the first page element is used for representing a movable line, the second page element is used for displaying content, and N and M are integers greater than or equal to 1;
mouse presses down in the position that is on a parallel with the first page element place of the frame A of browser, just the in-process that mouse removed in direction B, according to the first distance adjustment that mouse removed in direction B the display position of the first page element of the frame A that is on a parallel with the browser, according to first distance is adjusted respectively in the second page element with the content that shows in each part that is on a parallel with the first page element of the frame A of browser is adjacent.
2. The method of claim 1, further comprising:
when the mouse is detected to be pressed at the position where the first page element parallel to the frame A of the browser is located, modifying the dragging possibility state of the second page element into dragging possibility state;
and when the mouse is detected to be lifted, modifying the state of the second page element whether to be dragged into a non-dragging state.
3. The method according to claim 1 or 2, wherein the separately adjusting the content presented in each of the second page elements adjacent to the first page element parallel to the browser's bezel a comprises:
for each portion of the second page element adjacent to the first page element parallel to the browser's bezel A, updating the size of dimension C of the portion according to the first distance;
adjusting content shown in the portion according to the size of the updated dimension C of the portion.
4. The method of claim 3, wherein when the frame A is a top frame or a bottom frame, the direction B is upward, and the dimension C is height, the portion comprises a first portion and a second portion, and the updating the size of the dimension C of the portion according to the first distance comprises a combination of any one or more of the following:
subtracting the first distance from the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the first part; adding a second difference to the size of the dimension C of the second part before updating to obtain the size of the dimension C of the second part after updating; wherein the second difference is a difference between the size of the dimension C of the first portion before updating and the minimum value of the dimension C;
when a first difference obtained by subtracting the first distance from the size of the dimension C before updating of the first part is greater than or equal to the minimum value of the dimension C, taking the first difference as the size of the dimension C after updating of the first part, and adding the first distance to the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
5. The method of claim 3, wherein when the frame A is a top frame or a bottom frame, the direction B is downward, and the dimension C is height, the portion comprises a first portion and a second portion, and the updating the size of the dimension C of the portion according to the first distance comprises a combination of any one or more of the following:
subtracting the first distance from the size of the dimension C before updating of the second part to obtain the size of the dimension C after updating of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the dimension C after updating of the first part;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the updated dimension C of the second part; adding a fourth difference to the size of the dimension C of the first part before updating to obtain the size of the dimension C of the first part after updating; wherein the fourth difference is a difference between the size of the dimension C of the second portion before updating and the minimum value of the dimension C;
when a third difference obtained by subtracting the first distance from the size of the dimension C before updating of the second part is greater than or equal to the minimum value of the dimension C, taking the third difference as the size of the updated dimension C of the second part, and adding the first distance to the size of the dimension C before updating of the first part to obtain the size of the updated dimension C of the first part;
the first part is positioned above the first page element parallel to the frame A of the browser, and the second part is positioned below the first page element parallel to the frame A of the browser.
6. The method of claim 3, wherein when the frame A is a left frame or a right frame, the direction B is to the left, and the dimension C is a width, the portion comprises a third portion and a fourth portion, and the updating the size of the dimension C of the portion according to the first distance comprises any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the third part; adding a sixth difference to the dimension C of the fourth part before updating to obtain the dimension C of the fourth part after updating; wherein the sixth difference is a difference between the size of the dimension C of the third portion before updating and the minimum value of the dimension C;
when a fifth difference obtained by subtracting the first distance from the size of the dimension C before updating of the third part is greater than or equal to the minimum value of the dimension C, taking the fifth difference as the size of the dimension C after updating of the third part, and adding the first distance to the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
7. The method of claim 3, wherein when the frame A is a left frame or a right frame, the direction B is to the right, and the dimension C is a width, the portion comprises a third portion and a fourth portion, and the updating the size of the dimension C of the portion according to the first distance comprises any one or more of the following combinations:
subtracting the first distance from the size of the dimension C before updating of the fourth part to obtain the size of the dimension C after updating of the fourth part, and adding the first distance to the size of the dimension C before updating of the third part to obtain the size of the dimension C after updating of the third part;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C before updating of the fourth portion is smaller than the minimum value of the dimension C, taking the minimum value of the dimension C as the size of the dimension C after updating of the fourth portion; adding an eighth difference to the size of the dimension C of the third part before updating to obtain the size of the dimension C of the third part after updating; wherein the eighth difference is a difference between the size of the dimension C of the third portion before update and the minimum value of the dimension C;
when a seventh difference obtained by subtracting the first distance from the size of the dimension C of the fourth portion before updating is greater than or equal to the minimum value of the dimension C, taking the seventh difference as the size of the dimension C of the fourth portion after updating, and adding the first distance to the size of the dimension C of the third portion before updating to obtain the size of the dimension C of the third portion after updating;
the third part is positioned on the left of the first page element parallel to the frame A of the browser, and the fourth part is positioned on the right of the first page element parallel to the frame A of the browser.
8. The method according to claim 3, wherein the adjusting the display position of the first page element parallel to the browser bezel A according to the first distance of the mouse movement in the direction B comprises:
updating a second distance between the first page element parallel to the frame A of the browser and the frame A of the browser according to the first distance;
displaying the first page element parallel to the browser's frame A at the updated second distance.
9. The method of claim 8, wherein when the frame a is a top frame, the direction B is upward; or, the frame a is a left frame, and the direction B is leftward; or, the frame a is a bottom frame, and the direction B is downward; or, when the frame a is a right frame, and the direction B is rightward, the updating of the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser according to the first distance includes any one or more of:
subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the browser frame A is larger than the minimum value of the dimension C, subtracting the first distance from the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the browser frame A is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and subtracting the change value from the second distance before updating to obtain the updated second distance; wherein the change value is an absolute value of a difference between the size of the dimension C before update and the minimum value of the dimension C of the portion of the dimension C of which the size is the minimum value of the dimension C.
10. The method of claim 8, wherein when the frame a is a top frame, the direction B is downward; or, the frame a is a left frame, and the direction B is a right frame; or, the frame a is a bottom frame, and the direction B is upward; or, when the frame a is a right frame, and the direction B is leftward, the updating, according to the first distance, the second distance between the first page element parallel to the frame a of the browser and the frame a of the browser includes any one or more of:
adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of each part of the second page elements adjacent to the first page element parallel to the frame A of the browser is larger than the minimum value of the dimension C, adding the first distance to the second distance before updating to obtain the updated second distance;
when the size of the updated dimension C of one part of the second page elements adjacent to the first page element parallel to the frame A of the browser is equal to the minimum value of the dimension C, calculating the change value of the part of the dimension C with the size being the minimum value of the dimension C, and adding the change value to the second distance before updating to obtain the updated second distance.
11. An apparatus for implementing draggable page elements, comprising a processor and a computer-readable storage medium having instructions stored thereon, wherein the instructions, when executed by the processor, implement a method for implementing draggable page elements according to any of claims 1 to 10.
12. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of carrying out draggable page elements according to any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356355.3A CN111158568A (en) | 2019-12-25 | 2019-12-25 | Method and device for realizing draggable page element and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356355.3A CN111158568A (en) | 2019-12-25 | 2019-12-25 | Method and device for realizing draggable page element and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111158568A true CN111158568A (en) | 2020-05-15 |
Family
ID=70556758
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911356355.3A Pending CN111158568A (en) | 2019-12-25 | 2019-12-25 | Method and device for realizing draggable page element and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111158568A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110244924A1 (en) * | 2010-04-06 | 2011-10-06 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN102214079A (en) * | 2010-04-07 | 2011-10-12 | 阿里巴巴集团控股有限公司 | Method and device for displaying data of widget |
CN106383643A (en) * | 2016-09-18 | 2017-02-08 | 浙江慧脑信息科技有限公司 | Method for browsing picture and text at the same time |
CN106484220A (en) * | 2016-09-19 | 2017-03-08 | 珠海格力电器股份有限公司 | Split screen display method and device and terminal |
CN106803234A (en) * | 2015-11-26 | 2017-06-06 | 腾讯科技(深圳)有限公司 | Picture display control method and device in picture editor |
-
2019
- 2019-12-25 CN CN201911356355.3A patent/CN111158568A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110244924A1 (en) * | 2010-04-06 | 2011-10-06 | Lg Electronics Inc. | Mobile terminal and controlling method thereof |
CN103777887A (en) * | 2010-04-06 | 2014-05-07 | Lg电子株式会社 | Mobile terminal and controlling method thereof |
CN102214079A (en) * | 2010-04-07 | 2011-10-12 | 阿里巴巴集团控股有限公司 | Method and device for displaying data of widget |
CN106803234A (en) * | 2015-11-26 | 2017-06-06 | 腾讯科技(深圳)有限公司 | Picture display control method and device in picture editor |
CN106383643A (en) * | 2016-09-18 | 2017-02-08 | 浙江慧脑信息科技有限公司 | Method for browsing picture and text at the same time |
CN106484220A (en) * | 2016-09-19 | 2017-03-08 | 珠海格力电器股份有限公司 | Split screen display method and device and terminal |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20210117059A1 (en) | Application interface management method and apparatus | |
EP3220249B1 (en) | Method, device and terminal for implementing regional screen capture | |
CN109842818A (en) | A kind of video broadcasting method, device, computer equipment and storage medium | |
US9971480B2 (en) | Methods and apparatus for providing graphical view of digital content | |
CN105579947A (en) | Apparatus and method for displaying chart in electronic device | |
CN105335445A (en) | Layout display method and device | |
CN111339463A (en) | List data display method and device and electronic equipment | |
CN111949360A (en) | User interface adaptation method and device, electronic equipment and storage medium | |
CN106886511B (en) | Network table processing method and device | |
CN104808959B (en) | Information processing method and electronic equipment | |
CN111465917A (en) | Bendable electronic equipment and interface adaptation method thereof | |
CN112579927A (en) | Method and device for displaying navigation bar | |
CN109992188B (en) | Method and device for realizing scrolling display of iOS mobile terminal text | |
CN107256116B (en) | Page switching processing method and device, user terminal and readable storage medium | |
CN111783007B (en) | Display rendering method and device, electronic equipment and storage medium | |
CN111273826B (en) | Desktop icon management method, device, equipment and storage medium | |
US11243678B2 (en) | Method of panning image | |
CN111158568A (en) | Method and device for realizing draggable page element and computer readable storage medium | |
JP2015165396A (en) | Improvement in readability in portable apparatus | |
CN111368234A (en) | Window adjusting method, device and storage medium | |
CN104866620A (en) | Implementation method, device and system of background focus picture | |
CN103699381A (en) | Method and system for setting Widget based on Firefox OS (Operating System) platform | |
CN108829331B (en) | Monitoring processing method of sliding event and terminal equipment | |
CN103280208B (en) | A kind of method of automatic adjustment text importing size and device | |
CN112578956A (en) | Date and time range processing method, storage medium and electronic 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 |
Application publication date: 20200515 |
|
RJ01 | Rejection of invention patent application after publication |