Pop-up box control method and device, electronic equipment and storage medium
By displaying and controlling the pop-up frame in the browser interface, the shortcomings in the position adjustment and scaling of the pop-up frame in the existing technology are solved, and the movement control and scaling control of the pop-up frame are realized, which improves the convenience of user interaction.
Patent Information
- Application Number
- CN202310971694.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-03
- Publication Date
- 2025-02-14
AI Technical Summary
In the browser interface, it is difficult for the prior art to effectively display and control the pop-up frame, especially in terms of adjusting and scaling the pop-up frame position.
Provide a method of controlling a pop-up frame by displaying the pop-up frame in the browser interface and obtaining the indicated position based on the received pop-up frame control command, and determining whether it is located at the boundary or other position of the pop-up frame. If it is located in another position, Move the pop-up frame, and if it is located at the boundary, zoom the pop-up frame.
The movement control and zoom control of the pop-up frame are realized, and the pop-up frame can be effectively displayed and controlled in the browser interface, improving the convenience of user interaction.
Smart Images

Figure CN119440524A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a pop-up control method, device, electronic device and storage medium. Background Art
[0002] In the process of front-end development, in order to facilitate user use, it is necessary to develop an interface in the browser that is easy to interact with the user. Among them, the pop-up window interface can be used to display information and prompt the user's operation, which plays an important role in the interface. Therefore, it is necessary to provide a pop-up window control method so that the pop-up window can be displayed and controlled in the browser interface. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for controlling a pop-up window, so as to display and control a pop-up window in a browser interface. The specific technical solution is as follows:
[0004] In a first aspect of the present invention, a method for controlling a pop-up window is provided, the method comprising:
[0005] Display a pop-up window in the browser interface;
[0006] When receiving a pop-up window control instruction, obtaining a position indicated by the pop-up window control instruction;
[0007] Determine that the position is located at a border of the bullet frame or at another position in the bullet frame except the border;
[0008] If it is located at another position, moving the position of the pop-up box to the changed position indicated by the pop-up box control instruction;
[0009] If it is located at the boundary, the bullet box is scaled according to the changed position indicated by the bullet box control instruction and the original position of the bullet box.
[0010] In a possible embodiment, moving the position of the pop-up window to the changed position indicated by the pop-up window control instruction includes:
[0011] Respectively determining a horizontal position change amount and a vertical position change amount between the changed position indicated by the bullet box control instruction and the original position of the bullet box;
[0012] Accumulating the horizontal position change amount based on the original horizontal position of the bullet frame to obtain the changed horizontal position;
[0013] Accumulating the longitudinal position change amount on the basis of the original longitudinal position of the bullet frame to obtain the longitudinal position after the change;
[0014] The pop-up box is moved to the changed position indicated by the changed horizontal position and the changed vertical position.
[0015] In a possible embodiment, the method further includes:
[0016] If it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0;
[0017] If it is determined, based on the longitudinal position change amount and the height of the bullet box, that the bullet box exceeds the longitudinal range of the browser interface in the longitudinal direction, the longitudinal position change amount is adjusted to 0.
[0018] In a possible embodiment, scaling the bullet box according to the changed position indicated by the bullet box control instruction and the original position of the bullet box includes:
[0019] In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0020] In the case where the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determining a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulating the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box;
[0021] In the case where the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determining a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulating the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0022] When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0023] In a possible embodiment, the method further includes:
[0024] When receiving the first pop-up window change instruction, adjusting the width of the pop-up window to the width of the browser interface, adjusting the height of the pop-up window to a preset minimum height, and adjusting the position of the pop-up window to a position where the lower boundary of the pop-up window overlaps with the lower boundary of the browser;
[0025] When receiving the second pop-up window change instruction, the height of the pop-up window is adjusted to half of the height of the browser interface or a preset default height; the width of the pop-up window is controlled to remain unchanged or adjusted to a preset default width; the position of the pop-up window is adjusted to the center of the browser interface;
[0026] When the third pop-up box change instruction is received, the width of the pop-up box is adjusted to the width of the browser interface, the height of the pop-up box is adjusted to half the height of the browser interface, and the position of the pop-up box is adjusted to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
[0027] In a second aspect of the present invention, there is also provided an electronic device, including a memory, a transceiver, and a processor:
[0028] A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations:
[0029] Display a pop-up window in the browser interface;
[0030] When receiving a pop-up window control instruction, obtaining a position indicated by the pop-up window control instruction;
[0031] Determine that the position is located at a border of the bullet frame or at another position in the bullet frame except the border;
[0032] If it is located at another position, moving the position of the pop-up box to the changed position indicated by the pop-up box control instruction;
[0033] If it is located at the boundary, the bullet box is scaled according to the changed position indicated by the bullet box control instruction and the original position of the bullet box.
[0034] In a possible embodiment, the processor is specifically configured to:
[0035] Respectively determining a horizontal position change amount and a vertical position change amount between the changed position indicated by the bullet box control instruction and the original position of the bullet box;
[0036] Accumulating the horizontal position change amount based on the original horizontal position of the bullet frame to obtain the changed horizontal position;
[0037] Accumulating the longitudinal position change amount on the basis of the original longitudinal position of the bullet frame to obtain the longitudinal position after the change;
[0038] The pop-up box is moved to the changed position indicated by the changed horizontal position and the changed vertical position.
[0039] In a possible embodiment, the processor is further configured to:
[0040] If it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0;
[0041] If it is determined, based on the longitudinal position change amount and the height of the bullet box, that the bullet box exceeds the longitudinal range of the browser interface in the longitudinal direction, the longitudinal position change amount is adjusted to 0.
[0042] In a possible embodiment, the processor is specifically configured to:
[0043] In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0044] In the case where the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determining a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulating the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box;
[0045] In the case where the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determining a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulating the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0046] When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0047] In a possible embodiment, the processor is further configured to:
[0048] When receiving the first pop-up window change instruction, adjusting the width of the pop-up window to the width of the browser interface, adjusting the height of the pop-up window to a preset minimum height, and adjusting the position of the pop-up window to a position where the lower boundary of the pop-up window overlaps with the lower boundary of the browser;
[0049] When receiving the second pop-up window change instruction, the height of the pop-up window is adjusted to half of the height of the browser interface or a preset default height; the width of the pop-up window is controlled to remain unchanged or adjusted to a preset default width; the position of the pop-up window is adjusted to the center of the browser interface;
[0050] When the third pop-up box change instruction is received, the width of the pop-up box is adjusted to the width of the browser interface, the height of the pop-up box is adjusted to half the height of the browser interface, and the position of the pop-up box is adjusted to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
[0051] In a third aspect of the present invention, a pop-up window control device is provided, the device comprising:
[0052] A pop-up window display module is used to display a pop-up window in the browser interface;
[0053] A position acquisition module, configured to acquire the position indicated by the pop-up window control instruction when receiving the pop-up window control instruction;
[0054] A position determination module, used to determine that the position is located at a boundary of the bullet frame or at another position in the bullet frame except the boundary;
[0055] A bullet frame moving module, used for moving the position of the bullet frame to the changed position indicated by the bullet frame control instruction if the bullet frame is located at another position;
[0056] The bullet box scaling module is used to scale the bullet box according to the changed position indicated by the bullet box control instruction and the original position of the bullet box if it is located at the boundary.
[0057] In a possible embodiment, the bullet frame moving module is specifically used to:
[0058] Respectively determining a horizontal position change amount and a vertical position change amount between the changed position indicated by the bullet box control instruction and the original position of the bullet box;
[0059] Accumulating the horizontal position change amount based on the original horizontal position of the bullet frame to obtain the changed horizontal position;
[0060] Accumulating the longitudinal position change amount on the basis of the original longitudinal position of the bullet frame to obtain the longitudinal position after the change;
[0061] The pop-up box is moved to the changed position indicated by the changed horizontal position and the changed vertical position.
[0062] In a possible embodiment, the device further includes:
[0063] A first variation adjustment module, configured to adjust the horizontal position variation to 0 if it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position variation and the width of the bullet box;
[0064] The second variation adjustment module is used to adjust the longitudinal position variation to 0 if it is determined that the bullet box exceeds the longitudinal range of the browser interface in the longitudinal direction according to the longitudinal position variation and the height of the bullet box.
[0065] In a possible embodiment, the pop-up window zoom module is specifically used to:
[0066] In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0067] In the case where the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determining a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulating the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box;
[0068] In the case where the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determining a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulating the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0069] When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0070] In a possible embodiment, the device further includes:
[0071] A first pop-up box adjustment module is used to adjust the width of the pop-up box to the width of the browser interface, adjust the height of the pop-up box to a preset minimum height, and adjust the position of the pop-up box to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser when receiving the first pop-up box change instruction;
[0072] A second bullet box adjustment module is used for, when receiving a second bullet box change instruction, adjusting the height of the bullet box to half of the height of the browser interface or a preset default height; controlling the width of the bullet box to remain unchanged or adjusting the width of the bullet box to a preset default width; and adjusting the position of the bullet box to the center of the browser interface;
[0073] The third pop-up box adjustment module is used to adjust the width of the pop-up box to the width of the browser interface, adjust the height of the pop-up box to half the height of the browser interface, and adjust the position of the pop-up box to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser when receiving the third pop-up box change instruction.
[0074] In another aspect of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method step described in the first aspect is implemented.
[0075] In yet another aspect of the present invention, there is provided a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any one of the method steps described in the first aspect.
[0076] Beneficial effects of the embodiments of the present invention:
[0077] The pop-up box control method provided by the embodiment of the present invention can move the pop-up box to the position indicated by the pop-up box control instruction when the position indicated by the pop-up box control instruction is located at another position outside the boundary of the pop-up box, thereby realizing the movement of the pop-up box. When the position indicated by the pop-up box control instruction is located at the boundary of the pop-up box, the pop-up box can be scaled according to the changed position indicated by the pop-up box control instruction. That is, the embodiment of the present invention can realize the movement control and scaling control of the pop-up box, and can display and control the pop-up box in the browser interface.
[0078] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0080] Figure 1 A schematic diagram of a flow chart of a first pop-up window control method provided by an embodiment of the present invention;
[0081] Figure 2 A schematic flow chart of a second pop-up window control method provided by an embodiment of the present invention;
[0082] Figure 3 A schematic diagram of a flow chart of a third method for controlling a pop-up window provided by an embodiment of the present invention;
[0083] Figure 4 A schematic flow chart of a fourth method for controlling a pop-up window provided by an embodiment of the present invention;
[0084] Figure 5 A schematic flow chart of a fifth method for controlling a pop-up window provided by an embodiment of the present invention;
[0085] Figure 6 A schematic diagram of the structure of a first bullet box display provided by an embodiment of the present invention;
[0086] Figure 7 A schematic diagram of the structure of a second bullet box display provided by an embodiment of the present invention;
[0087] Figure 8 A schematic diagram of the structure of a third bullet box display provided by an embodiment of the present invention;
[0088] Fig. 9 A schematic flow chart of a sixth method for controlling a pop-up window provided by an embodiment of the present invention;
[0089] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention;
[0090] Fig.11 A schematic diagram of the structure of a pop-up window control device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0091] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field based on the present invention belong to the scope of protection of the present invention.
[0092] The embodiment of the present invention provides a method for controlling a pop-up window. Figure 1 , is a flow chart of a first bullet box control method provided by an embodiment of the present invention, the method comprising:
[0093] S101, displaying a pop-up window in the browser interface.
[0094] In S101, the browser can be a browser of the OMC (Operation and Maintenance Center) or a browser of other systems in the front-end development. OMC is commonly known as the network element management system, or network management for short, which includes network element management and some network management functions. The browser interface refers to the HTML (Hyper Text Markup Language) page accessed by the user through the terminal device. The browser can be any type of browser, which is not limited in the embodiment of the present invention. The terminal device can be a computer or a mobile terminal (such as a smart phone, etc.), which is not specifically limited in this embodiment.
[0095] Before the pop-up window is displayed, set the style of the content displayed in the pop-up window in advance. These styles generally include fonts, colors, layouts, pictures, etc. The shape of the pop-up window can be square, rectangular or other shapes.
[0096] S102: When a pop-up window control instruction is received, obtain a position indicated by the pop-up window control instruction.
[0097] In S102, the pop-up control instruction is an instruction for controlling the change of the pop-up, which may be issued by the user controlling the mouse, or by the user controlling the keyboard, by the user through voice, or by the user clicking on the touch screen or other forms. According to whether the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the position indicated by the pop-up control instruction is divided into two types: located at other positions in the pop-up except the boundary and located at the boundary of the pop-up, and the boundary of the pop-up is divided into the upper boundary, the lower boundary, the left boundary or the right boundary of the pop-up.
[0098] S103: Determine whether the position is located at the border of the bullet frame or at another position in the bullet frame except the border.
[0099] In S103, the position can be distinguished as being located at the boundary of the pop-up box or at other positions in the pop-up box except the boundary according to the value of the parameter type, or it can be distinguished by other methods. For example, if the pop-up box control instruction is issued by the mouse, and the position where the mouse is pressed is represented by the parameter type, if the parameter type has a value, it means that the position where the mouse is pressed is the boundary of the pop-up box, that is, the four sides of the pop-up box; if the parameter type has no value, it means that the position where the mouse is pressed is other positions in the pop-up box except the boundary, that is, the internal position surrounded by the four sides of the pop-up box.
[0100] S104: If it is located at another position, move the position of the pop-up box to the changed position indicated by the pop-up box control instruction.
[0101] In S104, if the position indicated by the pop-up control instruction is located at a position other than the border of the pop-up, it means that the current pop-up control instruction instructs the pop-up to move the pop-up, and the position of the pop-up is moved to the changed position indicated by the pop-up control instruction. For example, still taking the pop-up control instruction issued by the mouse as an example, if the position where the mouse is pressed is a position other than the border of the pop-up, the pop-up is moved to the position where the mouse is released.
[0102] S105: If the pop-up window is located at the boundary, scaling the pop-up window according to the changed position indicated by the pop-up window control instruction and the original position of the pop-up window.
[0103] In S105, if the position indicated by the pop-up control instruction is located at the border of the pop-up, it means that the current pop-up control instruction instructs to scale the pop-up. For example, still taking the pop-up control instruction issued by the mouse as an example, if the position where the mouse is pressed is the right border of the pop-up, the width of the pop-up will be reduced after the mouse moves to the left; the width of the pop-up will be increased after the mouse moves to the right. If the position where the mouse is pressed is the upper border of the pop-up, the height of the pop-up will be reduced after the mouse moves downward; the height of the pop-up will be increased after the mouse moves upward.
[0104] By selecting the above embodiment, when the position indicated by the pop-up control instruction is located at another position outside the boundary of the pop-up, the pop-up can be moved to the position indicated by the pop-up control instruction to achieve movement of the pop-up. When the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the pop-up can be scaled according to the changed position indicated by the pop-up control instruction. That is, the embodiment of the present invention can achieve movement control and scaling control of the pop-up, and can display and control the pop-up in the browser interface.
[0105] In one possible embodiment, see Figure 2 , is a flow chart of a second method for controlling a pop-up window provided in an embodiment of the present invention, which is similar to the above Figure 1 Compared to the illustrated embodiment, the above S104 includes S104A-A104D.
[0106] S104A: If it is located at other positions, determine the horizontal position change amount and the vertical position change amount between the changed position indicated by the pop-up box control instruction and the original position of the pop-up box respectively.
[0107] In S104A, assuming that the point in the upper left corner of the browser interface is the coordinate origin, the position of the point in the upper left corner of the pop-up box represents the position of the pop-up box, the coordinates of the original position of the pop-up box are (a1, b1), and the coordinates of the position after the change indicated by the pop-up box control instruction are (a2, b2), then the horizontal position change is a2-a1, and the vertical position change is b2-b1. Assuming that the coordinates of the original position of the pop-up box are (30, 50), and the coordinates of the position after the change indicated by the pop-up box control instruction are (80, 120), it means that the pop-up box moves toward the lower right direction, the horizontal position change is 50px, and the vertical position change is 70px.
[0108] S104B, accumulating the horizontal position change amount based on the original horizontal position of the pop-up frame to obtain the changed horizontal position.
[0109] In S104B, the coordinates of the original position of the pop-up box are (a1, b1), and the horizontal position change is A, then the horizontal position after the change is a1 + A. Assuming that the coordinates of the original position of the pop-up box are (30, 50), and the horizontal position change is 50px, then the horizontal position after the change is 80px.
[0110] S104C, accumulating the longitudinal position change amount based on the original longitudinal position of the pop-up frame to obtain the changed longitudinal position.
[0111] In S104C, the coordinates of the original position of the bullet box are (a1, b1), the vertical position change is B, and the vertical position after the change is b1 + B. Assuming that the coordinates of the original position of the bullet box are (30, 50), the vertical position change is 70px, and the vertical position after the change is 120px.
[0112] S104D, moving the pop-up window to the changed position indicated by the changed horizontal position and the changed vertical position.
[0113] In S104D, the coordinates of the original position of the pop-up box are (a1, b1), the horizontal position change is A, and the vertical position change is B, then the position after the change indicated by the pop-up box control instruction is the coordinates (a1+A, b1+B). Assuming that the coordinates of the original position of the pop-up box are (30, 50), the horizontal position change is 50px, and the vertical position change is 70px, then the coordinates of the position after the change indicated by the pop-up box control instruction are (80, 120).
[0114] By selecting the above embodiment, the changed position indicated by the pop-up box control instruction can be determined according to the horizontal position change amount and the vertical position change amount, and the pop-up box can be moved to the position, thereby realizing the function of moving the pop-up box.
[0115] In one possible embodiment, see Figure 3 , is a flow chart of a third method for controlling a pop-up window provided in an embodiment of the present invention, in the aforementioned Figure 2 Based on the second bullet box control method provided by the embodiment of the present invention, the above method also includes S301 and S302.
[0116] S301: If it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0.
[0117] In S301, the horizontal position change is the horizontal change between the position after the change indicated by the pop-up control instruction and the original position of the pop-up. In order to prevent the pop-up from being moved outside the browser interface in the horizontal direction, when the pop-up exceeds the horizontal range of the browser interface in the horizontal direction, the horizontal position change is adjusted to 0.
[0118] Determining whether the pop-up box exceeds the horizontal range of the browser interface in the horizontal direction refers to determining whether a portion of the pop-up box has moved out of the left border or the right border of the browser interface, or determining whether the pop-up box has completely moved out of the left border or the right border of the browser interface. Exemplarily, if the pop-up box moves to the left, and the left border of the pop-up box moves out of the left border of the browser interface, the horizontal position change is adjusted to 0; in a possible case, if the pop-up box moves to the left, and the left border of the pop-up box moves out of the left border of the browser interface, and the pop-up box completely moves out of the left border of the browser interface, the horizontal position change is adjusted to 0.
[0119] Alternatively, if the pop-up box moves to the right, and the left border of the pop-up box moves out of the right border of the browser interface, the horizontal position change is adjusted to 0. In one possible case, if the pop-up box moves to the right, and the right border of the pop-up box moves out of the right border of the browser interface, and the pop-up box completely moves out of the right border of the browser interface, the horizontal position change is adjusted to 0.
[0120] S302: If it is determined that the bullet box exceeds the vertical range of the browser interface in the vertical direction according to the vertical position change amount and the height of the bullet box, the vertical position change amount is adjusted to 0.
[0121] In S302, the vertical position change is the vertical change between the position indicated by the pop-up control instruction and the original position of the pop-up. In order to prevent the pop-up from being moved outside the browser interface in the vertical direction, when the pop-up exceeds the vertical range of the browser interface in the vertical direction, the vertical position change is adjusted to 0.
[0122] Determining whether the pop-up box exceeds the vertical range of the browser interface in the vertical direction refers to determining whether a portion of the pop-up box has moved out of the upper boundary or the lower boundary of the browser interface, or determining whether the pop-up box has completely moved out of the upper boundary or the lower boundary of the browser interface. Exemplarily, if the pop-up box moves upward, and the upper boundary of the pop-up box moves out of the upper boundary of the browser interface, the vertical position change is adjusted to 0; in a possible case, if the pop-up box moves upward, and the upper boundary of the pop-up box moves out of the upper boundary of the browser interface, and the pop-up box completely moves out of the upper boundary of the browser interface, the vertical position change is adjusted to 0.
[0123] Alternatively, if the bullet box moves downward and the lower border of the bullet box moves out of the lower border of the browser interface, the vertical position change is adjusted to 0. In one possible case, if the bullet box moves downward and the lower border of the bullet box moves out of the lower border of the browser interface, and the bullet box completely moves out of the lower border of the browser interface, the vertical position change is adjusted to 0.
[0124] By selecting the above embodiment, based on the horizontal position change, the vertical position change, the width of the pop-up box and the height of the pop-up box, it can be determined whether the pop-up box exceeds the range of the browser interface in the horizontal and vertical directions. Therefore, when the pop-up box exceeds the range of the browser interface, the position change of the pop-up box in the direction where the pop-up box exceeds the range of the browser interface is adjusted to 0, thereby preventing the pop-up box from being moved outside the browser interface.
[0125] In one possible embodiment, see Figure 4 , is a flow chart of a fourth bullet box control method provided by an embodiment of the present invention, which is similar to the above Figure 1 Compared with the embodiment shown, the above S105 is implemented through S401-S404.
[0126] S401, when the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determine the first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulate the above first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulate the above first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box.
[0127] In S401, when the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, it indicates that the current pop-up box control instruction indicates that the pop-up box is scaled by moving the upper boundary of the pop-up box. Exemplarily, the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction is b2, the original longitudinal position of the upper boundary is b1, and the original height of the pop-up box is h1, then the first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary is (b2-b1), the changed longitudinal position of the pop-up box is b1+(b2-b1), and the changed height of the pop-up box is h1-(b2-b1). For example, assuming that the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction is 120px, the original longitudinal position of the upper boundary is 50px, and the original height of the pop-up box is 600px, then the first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary is 70px, the changed longitudinal position of the pop-up box is 120px, and the changed height of the pop-up box is 530px.
[0128] S402, when the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determine the second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulate the above second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0129] In S402, when the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, it indicates that the current pop-up box control instruction indicates that the pop-up box is scaled by moving the right boundary of the pop-up box. Exemplarily, the changed horizontal position of the right boundary indicated by the pop-up box control instruction is a2, the original horizontal position of the right boundary is a1, and the original width of the pop-up box is w1, then the second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary is (a2-a1), and the changed width of the pop-up box is w1+(a2-a1). For example, assuming that the changed horizontal position of the right boundary indicated by the pop-up box control instruction is 80px, the original horizontal position of the right boundary is 30px, and the original width of the pop-up box is 600px, then the second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary is 50px, and the changed width of the pop-up box is 650px.
[0130] S403, when the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determine the third difference between the changed vertical position of the lower boundary indicated by the pop-up box control instruction and the original vertical position of the lower boundary, and accumulate the above third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box.
[0131] In S403, when the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, it indicates that the current pop-up box control instruction indicates that the pop-up box is scaled by moving the lower boundary of the pop-up box. Exemplarily, the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction is b4, the original longitudinal position of the lower boundary is b3, and the original height of the pop-up box is h2. Then the second difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary is (b4-b3), and the changed height of the pop-up box is h2+(b4-b3). For example, assuming that the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction is 120px, the original longitudinal position of the lower boundary is 50px, and the original height of the pop-up box is 600px, then the third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary is 70px, and the changed height of the pop-up box is 670px.
[0132] S404, when the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0133] In S404, when the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, it indicates that the current pop-up box control instruction indicates that the pop-up box is scaled by moving the left boundary of the pop-up box. Exemplarily, the changed horizontal position of the left boundary indicated by the pop-up box control instruction is a4, the original horizontal position of the left boundary is a3, and the original width of the pop-up box is w2. Then the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary is (a4-a3), the changed horizontal position of the pop-up box is a3+(a4-a3), and the changed height of the pop-up box is w2-(a4-a3). For example, assuming that the changed horizontal position of the left boundary indicated by the pop-up box control instruction is 80px, the original horizontal position of the left boundary is 30px, and the original width of the pop-up box is 600px, then the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary is 50px, the changed vertical position of the pop-up box is 80px, and the changed width of the pop-up box is 550px.
[0134] By selecting the above embodiment, the bullet box can be scaled by moving the position of the upper boundary, the right boundary, the lower boundary or the left boundary of the bullet box, thereby realizing the function of scaling the bullet box.
[0135] In one possible embodiment, see Figure 5 , which is a flow chart of a fifth pop-up window control method provided in an embodiment of the present invention, wherein the method includes S501, S502 and S503.
[0136] S501, when receiving the first pop-up box change instruction, adjust the width of the pop-up box to the width of the browser interface, adjust the height of the pop-up box to a preset minimum height, and adjust the position of the pop-up box to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
[0137] In S501, the first pop-up box change instruction is used to reduce the size of the pop-up box to a preset minimum size and adjust the position of the pop-up box to the bottom of the browser interface. The preset minimum size means that the width of the pop-up box is equal to the width of the browser interface, and the height of the pop-up box is the preset minimum height. The preset minimum height can be the height of the operation bar in the pop-up box, or it can be the sum of the height of the operation bar in the pop-up box and the height of the area outside the operation bar in the pop-up box. The current horizontal position of the pop-up box is 0, and the vertical position is the difference between the height of the browser interface and the height of the operation bar in the pop-up box.
[0138] Taking the preset minimum height as the height of the operation bar in the pop-up box as an example, assuming that the width of the browser interface is 1000px, the height of the browser interface is 900px, the original width of the pop-up box is 600px, and the original height of the pop-up box is 600px, wherein the height of the operation bar in the pop-up box is 30px, and the height of the area other than the operation bar in the pop-up box is 570px, then when the first pop-up box change instruction is received, the width of the pop-up box is adjusted from 600px to 1000px, the height of the pop-up box is adjusted from 600px to 30px, and the position of the pop-up box is adjusted to the position where the lower boundary of the pop-up box coincides with the lower boundary of the browser. The current horizontal position of the pop-up box is 0px, and the current vertical position of the pop-up box is 870px, that is, the coordinates of the current position of the pop-up box are (0, 870).
[0139] See also Figure 6 , which is a structural diagram of the first pop-up box display provided in an embodiment of the present invention. It can be seen from the figure that the width of the pop-up box is equal to the width of the browser interface, the height of the pop-up box is the preset minimum height, and the lower boundary of the pop-up box coincides with the lower boundary of the browser.
[0140] S502, when receiving the second pop-up box change instruction, for the height of the pop-up box, adjust the height of the pop-up box to half the height of the browser interface or the preset default height; for the width of the pop-up box, control the width of the pop-up box to remain unchanged or adjust the width of the pop-up box to the preset default width; adjust the position of the pop-up box to the center of the browser interface.
[0141] In S502, the second pop-up box change instruction is used to adjust the size of the pop-up box to a preset size and adjust the position of the pop-up box to the center of the browser. The preset size means that the height of the pop-up box is equal to half of the height of the browser interface or the height of the pop-up box is a preset default height, and the width of the pop-up box remains unchanged or the width of the pop-up box is a preset default width. The preset default height can be half of the height of the browser interface, or two-thirds of the height of the browser interface, or other default heights, and the preset default width can be the width of the browser interface, or half of the width of the browser interface, or other default widths.
[0142] Furthermore, when half of the browser interface height is 0, the height of the pop-up box is adjusted to a preset default height, such as 355px; when half of the browser interface height is not 0, the height of the pop-up box is adjusted to half of the browser interface height. When the width of the pop-up box is 0, the width of the pop-up box is adjusted to a preset default width, such as 900px; when the width of the pop-up box is not 0, the width of the pop-up box is controlled to remain unchanged. The current horizontal position of the pop-up box is half of the difference between the browser interface width and the pop-up box width, and the current vertical position of the pop-up box is half of the difference between the browser interface height and the pop-up box height.
[0143] Taking the example that the height of the pop-up box is equal to half the height of the browser interface and the width of the pop-up box remains unchanged, assuming that the width of the browser interface is 1000px, the height of the browser interface is 900px, the original width of the pop-up box is 600px, and the original height of the pop-up box is 600px, then when the second pop-up box change instruction is received, the width of the pop-up box is still 600px, the height of the pop-up box is adjusted from 600px to 450px, the current horizontal position of the pop-up box is 200px, and the current vertical position of the pop-up box is 225px, that is, the coordinates of the current position of the pop-up box are (200, 225).
[0144] See also Figure 7 , is a structural diagram of the second bullet box display provided in an embodiment of the present invention. It can be seen from the figure that the height of the bullet box is equal to half the height of the browser interface, and the bullet box is located in the center of the browser.
[0145] S503, when receiving the third pop-up box change instruction, adjust the width of the pop-up box to the width of the browser interface, adjust the height of the pop-up box to half the height of the browser interface, and adjust the position of the pop-up box to the position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
[0146] In S503, the third pop-up box change instruction is used to adjust the size of the pop-up box to half of the browser interface and adjust the position of the pop-up box to the bottom of the browser. Among them, adjusting the size of the pop-up box to half of the browser interface means adjusting the width of the pop-up box to the width of the browser interface and adjusting the height of the pop-up box to half of the height of the browser interface. The current horizontal position of the pop-up box is 0, and the current vertical position of the pop-up box is half of the height of the browser interface.
[0147] Assuming that the width of the browser interface is 1000px, the height of the browser interface is 900px, the original width of the pop-up box is 600px, and the original height of the pop-up box is 600px, when the third pop-up box change instruction is received, the width of the pop-up box is adjusted from 600px to 1000px, and the height of the pop-up box is adjusted from 600px to 450px. The current horizontal position of the pop-up box is 0px, and the current vertical position of the pop-up box is 450px, that is, the coordinates of the current position of the pop-up box are (0, 450).
[0148] See also Figure 8 , which is a structural diagram of the third pop-up box display provided in an embodiment of the present invention. It can be seen from the figure that the width of the pop-up box is equal to the width of the browser interface, the height of the pop-up box is equal to half the height of the browser interface, and the lower boundary of the pop-up box coincides with the lower boundary of the browser.
[0149] By selecting the above embodiment, the pop-up box can be displayed in the center of the browser interface, or when the lower boundary of the pop-up box coincides with the lower boundary of the browser, the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to half the height of the browser interface, that is, the pop-up box is maximized; the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to a preset minimum height, that is, the pop-up box is minimized. When the pop-up box is in a minimized state, the upper boundary of the pop-up box can be dragged to change the height of the pop-up box, and the user can see more content in the pop-up box. The embodiment of the present invention can achieve a variety of display effects of the pop-up box, providing convenience for users.
[0150] In one possible embodiment, see Fig. 9 , which is a flow chart of a sixth pop-up window control method provided in an embodiment of the present invention, and the method includes S901-S907.
[0151] S901, initially loading a pop-up window, and displaying the pop-up window in the bottom third of the browser interface.
[0152] In S901, the initially loaded pop-up window is displayed at the bottom third of the browser interface, that is, the width of the pop-up window is the width of the browser interface, and the height of the pop-up window is one third of the height of the browser interface. The position of the initially loaded pop-up window is preset by a technician with professional knowledge according to actual needs and / or experience.
[0153] S902, displaying a pop-up window in the center of the browser interface.
[0154] S903, displaying the pop-up operation bar at the bottom of the browser interface.
[0155] S904, changing the pop-up window from being displayed at one-third of the bottom of the browser interface to being displayed at one-half of the bottom of the browser interface.
[0156] S905, moving the pop-up window to any position on the browser interface.
[0157] S906: scaling the pop-up box by moving four boundaries of the pop-up box.
[0158] S907, when the pop-up window exceeds the range of the browser interface, the position change amount is adjusted to 0.
[0159] Among them, S902 corresponds to the aforementioned S502, S903 corresponds to the aforementioned S501, S904 corresponds to the aforementioned S503, S905 corresponds to the aforementioned S104A-S104D, S906 corresponds to the aforementioned S401-S404, and S907 corresponds to the aforementioned S301-S302.
[0160] It should be noted that which step of S901 to S907 to execute is determined according to the actual needs of the user.
[0161] Corresponding to the above-mentioned pop-up window control method, an embodiment of the present invention further provides an electronic device, see Fig.10 , is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention, including a memory 1001, a transceiver 1002, and a processor 1003;
[0162] The memory 1001 is used to store computer programs; the transceiver 1002 is used to send and receive data under the control of the processor 1003; the processor 1003 is used to read the computer program in the memory 1001 and perform the following operations:
[0163] Display a pop-up window in the browser interface;
[0164] When receiving a pop-up window control instruction, obtaining a position indicated by the pop-up window control instruction;
[0165] Determine whether the position is within the border of the bullet frame or elsewhere in the bullet frame except the border;
[0166] If it is at another position, the position of the pop-up box is moved to the changed position indicated by the pop-up box control instruction;
[0167] If it is located at the boundary, the pop-up frame is scaled according to the changed position indicated by the pop-up frame control instruction and the original position of the pop-up frame.
[0168] Among them, Fig.10 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 1003 and various circuits of memory represented by memory 1001 are linked together. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 1002 may be a plurality of components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium, which transmission medium may include a wireless channel, a wired channel, an optical cable, and other transmission media. The processor 1003 is responsible for managing the bus architecture and general processing, and the memory 1001 may store data used by the processor 1003 when performing operations.
[0169] The processor 1003 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or a complex programmable logic device (CPLD). The processor may also adopt a multi-core architecture.
[0170] By selecting the above embodiment, when the position indicated by the pop-up control instruction is located at another position outside the boundary of the pop-up, the pop-up can be moved to the position indicated by the pop-up control instruction to achieve movement of the pop-up. When the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the pop-up can be scaled according to the changed position indicated by the pop-up control instruction. That is, the embodiment of the present invention can achieve movement control and scaling control of the pop-up, and can display and control the pop-up in the browser interface.
[0171] In a possible embodiment, the processor 1003 is specifically configured to:
[0172] Determine the horizontal position change amount and the vertical position change amount between the changed position indicated by the pop-up frame control instruction and the original position of the pop-up frame respectively;
[0173] The horizontal position change is accumulated based on the original horizontal position of the bullet frame to obtain the horizontal position after the change;
[0174] The vertical position change amount is accumulated based on the original vertical position of the bullet frame to obtain the vertical position after the change;
[0175] Move the pop-up frame to the changed position indicated by the changed horizontal position and the changed vertical position.
[0176] By selecting the above embodiment, the changed position indicated by the pop-up box control instruction can be determined according to the horizontal position change amount and the vertical position change amount, and the pop-up box can be moved to the position, thereby realizing the function of moving the pop-up box.
[0177] In a possible embodiment, the processor 1003 is further configured to:
[0178] If the bullet box is judged to exceed the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0;
[0179] If it is determined that the bullet box exceeds the vertical range of the browser interface in the vertical direction according to the vertical position change amount and the height of the bullet box, the vertical position change amount is adjusted to 0.
[0180] By selecting the above embodiment, based on the horizontal position change, the vertical position change, the width of the pop-up box and the height of the pop-up box, it can be determined whether the pop-up box exceeds the range of the browser interface in the horizontal and vertical directions. Therefore, when the pop-up box exceeds the range of the browser interface, the position change of the pop-up box in the direction where the pop-up box exceeds the range of the browser interface is adjusted to 0, thereby preventing the pop-up box from being moved outside the browser interface.
[0181] In a possible embodiment, the processor 1003 is specifically configured to:
[0182] In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0183] When the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determine a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulate the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box;
[0184] When the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determine a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulate the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0185] When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0186] By selecting the above embodiment, the bullet box can be scaled by moving the position of the upper boundary, the right boundary, the lower boundary or the left boundary of the bullet box, thereby realizing the function of scaling the bullet box.
[0187] In a possible embodiment, the processor 1003 is further configured to:
[0188] When receiving the first pop-up window change instruction, adjusting the width of the pop-up window to the width of the browser interface, adjusting the height of the pop-up window to a preset minimum height, and adjusting the position of the pop-up window to a position where the lower boundary of the pop-up window overlaps with the lower boundary of the browser;
[0189] When receiving the second pop-up window change instruction, the height of the pop-up window is adjusted to half of the height of the browser interface or a preset default height; the width of the pop-up window is controlled to remain unchanged or adjusted to a preset default width; the position of the pop-up window is adjusted to the center of the browser interface;
[0190] When receiving the third pop-up box change instruction, the width of the pop-up box is adjusted to the width of the browser interface, the height of the pop-up box is adjusted to half the height of the browser interface, and the position of the pop-up box is adjusted to the position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
[0191] By selecting the above embodiment, the pop-up box can be displayed in the center of the browser interface, or when the lower boundary of the pop-up box coincides with the lower boundary of the browser, the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to half the height of the browser interface, that is, the pop-up box is maximized; the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to a preset minimum height, that is, the pop-up box is minimized. When the pop-up box is in a minimized state, the upper boundary of the pop-up box can be dragged to change the height of the pop-up box, and the user can see more content in the pop-up box. The embodiment of the present invention can achieve a variety of display effects of the pop-up box, providing convenience for users.
[0192] Corresponding to the above-mentioned pop-up window control method, the embodiment of the present invention also provides a pop-up window control device, see Fig.11 , a schematic diagram of the structure of a pop-up window control device provided by an embodiment of the present invention, the device comprises:
[0193] The pop-up window display module 1101 is used to display the pop-up window in the browser interface;
[0194] The position acquisition module 1102 is used to acquire the position indicated by the pop-up box control instruction when receiving the pop-up box control instruction;
[0195] A position determination module 1103 is used to determine whether the position is located at a boundary of the bullet frame or at another position in the bullet frame except the boundary;
[0196] The bullet box moving module 1104 is used to move the position of the bullet box to the changed position indicated by the bullet box control instruction if the position is at another position;
[0197] The bullet box scaling module 1105 is used to scale the bullet box according to the changed position indicated by the bullet box control instruction and the original position of the bullet box if it is located at the boundary.
[0198] By selecting the above embodiment, when the position indicated by the pop-up control instruction is located at another position outside the boundary of the pop-up, the pop-up can be moved to the position indicated by the pop-up control instruction to achieve movement of the pop-up. When the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the pop-up can be scaled according to the changed position indicated by the pop-up control instruction. That is, the embodiment of the present invention can achieve movement control and scaling control of the pop-up, and can display and control the pop-up in the browser interface.
[0199] In a possible embodiment, the bullet frame moving module 1104 is specifically used to:
[0200] Determine the horizontal position change amount and the vertical position change amount between the changed position indicated by the pop-up frame control instruction and the original position of the pop-up frame respectively;
[0201] The horizontal position change is accumulated based on the original horizontal position of the bullet frame to obtain the horizontal position after the change;
[0202] The vertical position change amount is accumulated based on the original vertical position of the bullet frame to obtain the vertical position after the change;
[0203] Move the pop-up frame to the changed position indicated by the changed horizontal position and the changed vertical position.
[0204] By selecting the above embodiment, the changed position indicated by the pop-up box control instruction can be determined according to the horizontal position change amount and the vertical position change amount, and the pop-up box can be moved to the position, thereby realizing the function of moving the pop-up box.
[0205] In a possible embodiment, the above device further includes:
[0206] A first variation adjustment module is used to adjust the horizontal position variation to 0 if it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position variation and the width of the bullet box;
[0207] The second variation adjustment module is used to adjust the vertical position variation to 0 if it is determined that the bullet box exceeds the vertical range of the browser interface in the vertical direction according to the vertical position variation and the height of the bullet box.
[0208] By selecting the above embodiment, based on the horizontal position change, the vertical position change, the width of the pop-up box and the height of the pop-up box, it can be determined whether the pop-up box exceeds the range of the browser interface in the horizontal and vertical directions. Therefore, when the pop-up box exceeds the range of the browser interface, the position change of the pop-up box in the direction where the pop-up box exceeds the range of the browser interface is adjusted to 0, thereby preventing the pop-up box from being moved outside the browser interface.
[0209] In a possible embodiment, the bullet box zoom module 1105 is specifically used to:
[0210] In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0211] When the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determine a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulate the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box;
[0212] When the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determine a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulate the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box;
[0213] When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
[0214] By selecting the above embodiment, the bullet box can be scaled by moving the position of the upper boundary, the right boundary, the lower boundary or the left boundary of the bullet box, thereby realizing the function of scaling the bullet box.
[0215] In a possible embodiment, the above device further includes:
[0216] A first pop-up frame adjustment module is used to adjust the width of the pop-up frame to the width of the browser interface, adjust the height of the pop-up frame to a preset minimum height, and adjust the position of the pop-up frame to a position where the lower boundary of the pop-up frame overlaps with the lower boundary of the browser when receiving the first pop-up frame change instruction;
[0217] The second pop-up box adjustment module is used to, when receiving the second pop-up box change instruction, adjust the height of the pop-up box to half of the height of the browser interface or a preset default height; control the width of the pop-up box to remain unchanged or adjust the width of the pop-up box to a preset default width; and adjust the position of the pop-up box to the center of the browser interface;
[0218] The third pop-up box adjustment module is used to adjust the width of the pop-up box to the width of the browser interface, adjust the height of the pop-up box to half the height of the browser interface, and adjust the position of the pop-up box to the position where the lower boundary of the pop-up box coincides with the lower boundary of the browser when receiving the third pop-up box change instruction.
[0219] By selecting the above embodiment, the pop-up box can be displayed in the center of the browser interface, or when the lower boundary of the pop-up box coincides with the lower boundary of the browser, the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to half the height of the browser interface, that is, the pop-up box is maximized; the width of the pop-up box can be adjusted to the width of the browser interface, and the height of the pop-up box can be adjusted to a preset minimum height, that is, the pop-up box is minimized. When the pop-up box is in a minimized state, the upper boundary of the pop-up box can be dragged to change the height of the pop-up box, and the user can see more content in the pop-up box. The embodiment of the present invention can achieve a variety of display effects of the pop-up box, providing convenience for users.
[0220] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned pop-up box control methods are implemented.
[0221] By selecting the above embodiment, when the position indicated by the pop-up control instruction is located at another position outside the boundary of the pop-up, the pop-up can be moved to the position indicated by the pop-up control instruction to achieve movement of the pop-up. When the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the pop-up can be scaled according to the changed position indicated by the pop-up control instruction. That is, the embodiment of the present invention can achieve movement control and scaling control of the pop-up, and can display and control the pop-up in the browser interface.
[0222] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the pop-up window control methods in the above embodiments.
[0223] By selecting the above embodiment, when the position indicated by the pop-up control instruction is located at another position outside the boundary of the pop-up, the pop-up can be moved to the position indicated by the pop-up control instruction to achieve movement of the pop-up. When the position indicated by the pop-up control instruction is located at the boundary of the pop-up, the pop-up can be scaled according to the changed position indicated by the pop-up control instruction. That is, the embodiment of the present invention can achieve movement control and scaling control of the pop-up, and can display and control the pop-up in the browser interface.
[0224] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0225] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0226] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, and computer-readable storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0227] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for controlling a pop-up window, characterized in that: The method comprises: Display a pop-up window in the browser interface; When receiving a pop-up window control instruction, obtaining a position indicated by the pop-up window control instruction; Determine that the position is located at a border of the bullet frame or at another position in the bullet frame except the border; If it is located at another position, moving the position of the pop-up box to the changed position indicated by the pop-up box control instruction; If it is located at the boundary, the bullet box is scaled according to the changed position indicated by the bullet box control instruction and the original position of the bullet box.
2. The method according to claim 1, characterized in that The step of moving the position of the pop-up window to the changed position indicated by the pop-up window control instruction includes: Respectively determining a horizontal position change amount and a vertical position change amount between the changed position indicated by the bullet box control instruction and the original position of the bullet box; Accumulating the horizontal position change amount based on the original horizontal position of the bullet frame to obtain the changed horizontal position; Accumulating the longitudinal position change amount on the basis of the original longitudinal position of the bullet frame to obtain the longitudinal position after the change; The pop-up box is moved to the changed position indicated by the changed horizontal position and the changed vertical position.
3. The method according to claim 2, characterized in that The method further comprises: If it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0; If it is determined, based on the longitudinal position change amount and the height of the bullet box, that the bullet box exceeds the longitudinal range of the browser interface in the longitudinal direction, the longitudinal position change amount is adjusted to 0.
4. The method according to claim 1, characterized in that: The step of scaling the bullet box according to the changed position indicated by the bullet box control instruction and the original position of the bullet box includes: In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box; In the case where the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determining a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulating the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box; In the case where the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determining a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulating the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box; When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When receiving the first pop-up window change instruction, adjusting the width of the pop-up window to the width of the browser interface, adjusting the height of the pop-up window to a preset minimum height, and adjusting the position of the pop-up window to a position where the lower boundary of the pop-up window overlaps with the lower boundary of the browser; When receiving the second pop-up window change instruction, the height of the pop-up window is adjusted to half of the height of the browser interface or a preset default height; the width of the pop-up window is controlled to remain unchanged or adjusted to a preset default width; the position of the pop-up window is adjusted to the center of the browser interface; When the third pop-up box change instruction is received, the width of the pop-up box is adjusted to the width of the browser interface, the height of the pop-up box is adjusted to half the height of the browser interface, and the position of the pop-up box is adjusted to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
6. An electronic device, characterized in that: Including memory, transceiver, processor: A memory for storing a computer program; a transceiver for transmitting and receiving data under the control of the processor; and a processor for reading the computer program in the memory and performing the following operations: Display a pop-up window in the browser interface; When receiving a pop-up window control instruction, obtaining a position indicated by the pop-up window control instruction; Determine that the position is located at a border of the bullet frame or at another position in the bullet frame except the border; If it is located at another position, moving the position of the pop-up box to the changed position indicated by the pop-up box control instruction; If it is located at the boundary, the bullet box is scaled according to the changed position indicated by the bullet box control instruction and the original position of the bullet box.
7. The electronic device according to claim 6, characterized in that: The processor is specifically used for: Respectively determining a horizontal position change amount and a vertical position change amount between the changed position indicated by the bullet box control instruction and the original position of the bullet box; Accumulating the horizontal position change amount based on the original horizontal position of the bullet frame to obtain the changed horizontal position; Accumulating the longitudinal position change amount on the basis of the original longitudinal position of the bullet frame to obtain the longitudinal position after the change; The pop-up box is moved to the changed position indicated by the changed horizontal position and the changed vertical position.
8. The electronic device according to claim 7, characterized in that: The processor is further configured to: If it is determined that the bullet box exceeds the horizontal range of the browser interface in the horizontal direction according to the horizontal position change amount and the width of the bullet box, the horizontal position change amount is adjusted to 0; If it is determined, based on the longitudinal position change amount and the height of the bullet box, that the bullet box exceeds the longitudinal range of the browser interface in the longitudinal direction, the longitudinal position change amount is adjusted to 0.
9. The electronic device according to claim 6, characterized in that: The processor is specifically used for: In the case where the boundary indicated by the pop-up box control instruction is the upper boundary of the pop-up box, determining a first difference between the changed longitudinal position of the upper boundary indicated by the pop-up box control instruction and the original longitudinal position of the upper boundary, accumulating the first difference on the basis of the original longitudinal position of the pop-up box to obtain the changed longitudinal position of the pop-up box, and accumulating the first difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box; In the case where the boundary indicated by the pop-up box control instruction is the right boundary of the pop-up box, determining a second difference between the changed horizontal position of the right boundary indicated by the pop-up box control instruction and the original horizontal position of the right boundary, and accumulating the second difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box; In the case where the boundary indicated by the pop-up box control instruction is the lower boundary of the pop-up box, determining a third difference between the changed longitudinal position of the lower boundary indicated by the pop-up box control instruction and the original longitudinal position of the lower boundary, and accumulating the third difference on the basis of the original height of the pop-up box to obtain the changed height of the pop-up box; When the boundary indicated by the pop-up box control instruction is the left boundary of the pop-up box, determine the fourth difference between the changed horizontal position of the left boundary indicated by the pop-up box control instruction and the original horizontal position of the left boundary, accumulate the above fourth difference on the basis of the original horizontal position of the pop-up box to obtain the changed horizontal position of the pop-up box, and accumulate the above fourth difference on the basis of the original width of the pop-up box to obtain the changed width of the pop-up box.
10. The electronic device according to any one of claims 6 to 9, characterized in that: The processor is further configured to: When receiving the first pop-up window change instruction, adjusting the width of the pop-up window to the width of the browser interface, adjusting the height of the pop-up window to a preset minimum height, and adjusting the position of the pop-up window to a position where the lower boundary of the pop-up window overlaps with the lower boundary of the browser; When receiving the second pop-up window change instruction, the height of the pop-up window is adjusted to half of the height of the browser interface or a preset default height; the width of the pop-up window is controlled to remain unchanged or adjusted to a preset default width; the position of the pop-up window is adjusted to the center of the browser interface; When the third pop-up box change instruction is received, the width of the pop-up box is adjusted to the width of the browser interface, the height of the pop-up box is adjusted to half the height of the browser interface, and the position of the pop-up box is adjusted to a position where the lower boundary of the pop-up box overlaps with the lower boundary of the browser.
11. A pop-up control device, characterized in that: The device comprises: A pop-up window display module is used to display a pop-up window in the browser interface; A position acquisition module, configured to acquire the position indicated by the pop-up window control instruction when receiving the pop-up window control instruction; A position determination module, used to determine that the position is located at a boundary of the bullet frame or at another position in the bullet frame except the boundary; A bullet frame moving module, used for moving the position of the bullet frame to the changed position indicated by the bullet frame control instruction if the bullet frame is located at another position; The bullet box scaling module is used to scale the bullet box according to the changed position indicated by the bullet box control instruction and the original position of the bullet box if it is located at the boundary.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 5 are implemented.