WO2018000786A1 - 一种悬浮菜单的自动移动方法和装置 - Google Patents
一种悬浮菜单的自动移动方法和装置 Download PDFInfo
- Publication number
- WO2018000786A1 WO2018000786A1 PCT/CN2016/113331 CN2016113331W WO2018000786A1 WO 2018000786 A1 WO2018000786 A1 WO 2018000786A1 CN 2016113331 W CN2016113331 W CN 2016113331W WO 2018000786 A1 WO2018000786 A1 WO 2018000786A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- floating menu
- menu
- floating
- page
- move
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
Definitions
- the present invention relates to the field of computer technologies, and in particular, to an automatic moving method and apparatus for a floating menu.
- the interactive whiteboard is a brand-new and powerful high-tech teaching tool that combines traditional and modern education. Its special technology can meet the development needs of classroom teaching. It not only inherits the advantages of ordinary blackboard teaching methods. It also integrates the advantages of modern multimedia teaching, especially its unique advantages in interactive learning, collaborative learning, and heuristic learning.
- the elements in the existing electronic whiteboard software page and the setting menus suspended above the page are separate and do not interfere with each other.
- the handwriting element when writing to the area where the menu is located, can no longer continue writing because the menu in the page occupies the written area; if the writing operation is to be performed in the area where the menu is located, the menu must be manually removed or Close the menu.
- the writing area can not be used well, and affect the aesthetics of writing; if you move or close the menu, you must do it manually, the operation is extremely inconvenient, and the continuity of writing will be interrupted.
- An object of the embodiments of the present invention is to provide an automatic moving method and device for a floating menu, which realizes automatic movement of a floating menu to better utilize a page area and improve the writing experience of the electronic whiteboard.
- the present invention provides a method for automatically moving a floating menu, including:
- the hover menu is moved to a position that does not collide with the element.
- the element is a point element
- the real-time position coordinates of the elements in the electronic whiteboard page and the floating menu are specifically:
- the element is a regional element
- the real-time position coordinates of the elements in the electronic whiteboard page and the floating menu are specifically:
- the determining, according to the acquired element and the position coordinate of the floating menu, whether the element collides with the floating menu specifically:
- moving the floating menu to a position that does not collide with the element includes:
- the floating menu is moved up when the element is located on the lower half of the electronic whiteboard page and the top of the floating menu has a page space available for the floating menu to move.
- the present invention also provides an automatic moving device for a floating menu, comprising:
- a coordinate acquiring module configured to acquire an element in the electronic whiteboard page and a real-time position coordinate of the floating menu
- a collision detecting module configured to determine, according to the acquired element and the position coordinate of the floating menu, whether the element collides with the floating menu
- a menu moving module for moving the floating menu to a position that does not collide with the element when a collision occurs.
- the element is a point element
- the coordinate acquisition module includes a first coordinate acquisition unit configured to acquire coordinates of the point element and coordinates of a set of diagonal vertices of the floating menu.
- the element is a regional element
- the coordinate acquisition module includes a second coordinate acquisition unit configured to acquire coordinates of a set of diagonal vertices of the area element and coordinates of a set of diagonal vertices of the floating menu.
- the collision detection module comprises:
- a collision detecting unit configured to determine, according to the acquired element and a position coordinate of the floating menu, whether a distance between the element and the floating menu is less than a preset collision interval value; if yes, determining the element Colliding with the floating menu; if not, determining that the element does not collide with the floating menu.
- the menu movement module comprises:
- a right shifting unit configured to move the floating menu to the right when the element is located on a left half of the electronic whiteboard page, and a right side of the floating menu has a page space available for the floating menu to move;
- a left shifting unit configured to move the floating menu to the left when the element is located on a right half of the electronic whiteboard page, and a left side of the floating menu has a page space available for the floating menu to move;
- a downward shifting unit configured to move the floating menu down when the element is located on an upper half side of the electronic whiteboard page, and a page space available for the floating menu to move under the floating menu;
- an upward shifting unit configured to move the floating menu up when the element is located on a lower half side of the electronic whiteboard page and a page space above the floating menu has a space available for the floating menu to move.
- the invention obtains the real-time position coordinates of the elements in the electronic whiteboard page and the floating menu; determines whether the element collides with the floating menu according to the acquired position coordinates; when the collision occurs, moves the floating menu to no The location where the element collides.
- the position of the floating menu can be automatically adjusted when the page element conflicts with the floating menu, so as to fully utilize the page area blocked by the floating menu, which is beneficial to improve the writing efficiency and improve the writing experience.
- FIG. 1 is a flow chart of an embodiment of an automatic movement method of a floating menu provided by the present invention
- FIG. 2 is a schematic diagram of an electronic whiteboard page provided by the present invention.
- FIG. 3 is a block diagram showing the structure of an embodiment of an automatic moving device for a floating menu provided by the present invention.
- FIG. 1 there is shown a flow diagram of one embodiment of an automatic movement method for a floating menu provided by the present invention.
- the automatic moving method of the floating menu includes steps S1 to S3:
- the floating menu is a setting menu suspended above the electronic whiteboard page, and the element is any object in the electronic whiteboard page.
- the element is a point element.
- the point element is an object different from the area element, and may be a point in the whiteboard page or an element that can be approximated as a point.
- step S1 is specifically:
- the electronic whiteboard page 21 is provided with a floating menu 22, wherein the upper left corner of the whiteboard page 21 is the coordinate origin O(0, 0), and the lower right corner of the whiteboard page 21 is the maximum coordinate M of the whiteboard page (x m , y m ), the point element may be the current writing point A (x 0 , y 0 ) of the handwriting 23, the floating menu 22 is a rectangular menu, and the coordinates of a set of diagonal vertices of the floating menu 22 are obtained. It is B (x 1 , y 1 ) in the upper right corner and C (x 2 , y 2 ) in the lower left corner. It is understood by those skilled in the art that the coordinates of another set of diagonal vertices (ie, the upper left corner and the lower right corner) of the floating menu 22 may also be used in the specific implementation, which is not limited by the present invention.
- the element is a regional element.
- the area element is an element occupying a certain area in a whiteboard page, and the area is preferably a rectangular area.
- step S1 is specifically:
- the area element may be the text box 24 in the whiteboard page 21.
- the coordinates of a set of diagonal vertices of the area element 24 obtained in this embodiment are the upper right corner E (x 3 , y 3 And the lower left corner F(x 4 , y 4 ), the coordinates of a set of diagonal vertices of the floating menu 22 obtained are the upper right corner B(x 1 , y 1 ) and the lower left corner C(x 2 , y 2 ) .
- a collision interval value may be set in advance, and when the distance between the point element and the floating menu is less than the collision interval value, it is determined that the two collide.
- the step S2 is specifically:
- the element is a point element A, that is, in a specific implementation, when x 0 ⁇ [x 2 -d, x 1 +d] is detected, and y 0 ⁇ [y 1 -d,y When 2 +d], it is determined that the two collide, and the floating menu needs to be moved; otherwise, it is determined that there is no collision between the two, and there is no need to move the floating menu.
- d is a preset collision interval value.
- the element is a region element 24, ie in a specific implementation, when detected and When it is determined that the two collide, the floating menu 22 needs to be moved; otherwise, it is determined that there is no collision between the two, and there is no need to move the floating menu.
- d is a preset collision interval value.
- the invention obtains the real-time position coordinates of the elements in the electronic whiteboard page and the floating menu. Judging whether the element collides with the floating menu according to the acquired position coordinates. In the event of a collision, the hover menu is moved to a position that does not collide with the element.
- the position of the floating menu can be automatically adjusted when the page element conflicts with the floating menu, so as to fully utilize the page area blocked by the floating menu, which is beneficial to improve the writing efficiency and improve the writing experience.
- step S3 includes:
- the floating menu is shifted to the right when the element is located on the left half of the electronic whiteboard page and the right side of the floating menu has a page space available for the floating menu to move.
- the floating menu is shifted to the left when the element is located on the right half of the electronic whiteboard page and the left side of the floating menu has a page space available for the floating menu to move.
- the floating menu is moved down when the element is located on the upper half of the electronic whiteboard page and the page below the floating menu has a page space available for the floating menu to move.
- the floating menu is moved up when the element is located on the lower half of the electronic whiteboard page and the top of the floating menu has a page space available for the floating menu to move.
- the height h and width w of the floating menu and the maximum coordinate M(x m , y m ) of the electronic whiteboard page are combined, and the position coordinates of the floating menu are combined to determine the circumference of the floating menu. Whether there is room for it to move. Specifically, if w ⁇ x m -x 2 , it means that the right side of the floating menu has a page space for moving, and can move to the right side when the floating menu needs to be moved. If w ⁇ x 1 , it means that the left side of the floating menu has a page space for moving, and can move to the left when the floating menu needs to be moved.
- h ⁇ y m -y 1 it means that the page below the floating menu has a page space for moving, and can move downward when the floating menu needs to be moved. If h ⁇ y 2 , it means that the top of the floating menu has a page space for moving, and can move upward when the floating menu needs to be moved.
- the present invention also determines the moving direction of the floating menu by obtaining the position of the element in the electronic whiteboard page.
- the position of the element in the electronic whiteboard page ie, the upper, lower, left, and right half sides
- the position of the element in the electronic whiteboard page can be determined by the position of the geometric center of the element in the electronic whiteboard page. Specifically, when the center of the element is located on the left half of the electronic whiteboard page, that is, when the x coordinate of the element center is less than x m /2, the floating menu is shifted to the right. Conversely, when the center of the element is located on the right half of the electronic whiteboard page, that is, when the x coordinate of the center of the element is greater than x m /2, the floating menu is shifted to the left.
- the floating menu moves the distance so that the distance between the floating menu and the element is slightly larger than the preset collision interval, which is not limited by the present invention, and can be set according to specific needs by those skilled in the art. As shown in FIG.
- the coordinates of the center of the element are the same as the coordinates of the point element, and both are (x 0 , y 0 ).
- the coordinates of the center of the element are ((x 3 + x 4 )/2, (y 3 + y 4 )/2) or (x 4 + w A /2, y 3 +h A /2), where w A is the width of the region element and h A is the height of the region element.
- the moving directions of the up, down, left, and right directions can be simultaneously judged, and the final moving direction of the floating menu is the vector superposition of the judgment results of the four directions.
- the invention can obtain the optimal moving path of the floating menu by judging the moving direction, and is beneficial to realize optimal utilization of the whiteboard page.
- the invention provides an automatic moving method for a floating menu. When there is a floating menu on the electronic whiteboard page, the user performs a writing operation on the whiteboard, and when writing to the vicinity of the menu, if the writing point is found to collide with the menu, the The time menu will automatically determine the direction of movement and move, and the user can continue to write, thereby improving the user's experience in writing.
- FIG. 3 there is shown a block diagram of an embodiment of an automatic moving device for a floating menu provided by the present invention.
- the basic principle of the embodiment is the same as that of the embodiment shown in FIG. 1.
- the automatic moving device of the floating menu includes:
- the coordinate acquisition module 31 is configured to acquire elements in the electronic whiteboard page and real-time position coordinates of the floating menu.
- the collision detecting module 32 is configured to determine, according to the acquired element and the position coordinates of the floating menu, whether the element collides with the floating menu.
- the menu moving module 33 is configured to move the floating menu to a position that does not collide with the element when a collision occurs.
- the element is a point element.
- the point element may be the current writing point of the handwriting.
- the coordinate acquiring module 31 includes a first coordinate acquiring unit 311, configured to acquire coordinates of the point element and coordinates of a set of diagonal vertices of the floating menu.
- the element is a regional element.
- the area element may be a text box.
- the coordinate acquiring module 31 includes a second coordinate acquiring unit 312, configured to acquire coordinates of a set of diagonal vertices of the area element and coordinates of a set of diagonal vertices of the floating menu.
- the collision detecting module 32 includes a collision detecting unit 321 for receiving the element according to the obtained and the suspension dish a position coordinate of the single, determining whether the distance between the element and the floating menu is less than a preset collision interval value; if yes, determining that the element collides with the floating menu; if not, determining the element There is no collision with the floating menu. Further, the menu moving module 33 includes:
- the right shifting unit 331 is configured to move the floating menu to the right when the element is located on the left half of the electronic whiteboard page and the right side of the floating menu has a page space available for the floating menu to move.
- the left shifting unit 332 is configured to move the floating menu to the left when the element is located on the right half of the electronic whiteboard page and the left side of the floating menu has a page space that can be moved by the floating menu.
- the shifting unit 333 is configured to move the floating menu down when the element is located on the upper half of the electronic whiteboard page and the page space below the floating menu has a page space for the floating menu to move.
- the shifting unit 334 is configured to move the floating menu up when the element is located on a lower half side of the electronic whiteboard page and a page space above the floating menu is available for the floating menu to move.
- the invention obtains the real-time position coordinates of the elements in the electronic whiteboard page and the floating menu. Judging whether the element collides with the floating menu according to the acquired position coordinates. In the event of a collision, the hover menu is moved to a position that does not collide with the element.
- the position of the floating menu can be automatically adjusted when the page element conflicts with the floating menu, so as to fully utilize the page area blocked by the floating menu, which is beneficial to improve the writing efficiency and improve the writing experience.
- the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical. Units can be located in one place or distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
- the connection relationship between the modules indicates that there is a communication connection between them, and specifically, one or more communication buses or signal lines can be realized.
- the present invention can be implemented by means of software plus necessary general hardware, and of course, dedicated hardware, dedicated CPU, dedicated memory, dedicated memory, Special components and so on.
- functions performed by computer programs can be easily implemented with the corresponding hardware, and the specific hardware structure used to implement the same function can be various, such as analog circuits, digital circuits, or dedicated circuits. Circuits, etc.
- software program implementation is a better implementation in more cases.
- the technical solution of the present invention which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
- U disk includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
- a computer device which may be a personal computer, server, or network device, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
一种悬浮菜单的自动移动方法和装置,获取电子白板页面中的元素以及悬浮菜单的实时位置坐标(S1);根据获取的元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞(S2);在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置(S3)。可在页面元素与悬浮菜单发生冲突时自动调整悬浮菜单的位置,以充分利用被悬浮菜单遮挡的页面区域,有利于提高书写的效率,改善书写体验。
Description
本发明涉及计算机技术领域,尤其涉及一种悬浮菜单的自动移动方法和装置。
交互式电子白板是实现传统与现代教育结合的一款全新的、功能强大的高科技教学工具,其特殊的技术正好能够适合课堂教学的发展需求,它既继承了普通黑板这一教学手段的优点,又整合了现代多媒体教学的优势,特别是它在交互式学习、合作式学习、启发式学习等方面具有独特优势。
然而,现有的电子白板软件页面中的元素与悬浮在页面之上的设置菜单各自为政,互不干涉。例如笔迹元素,当书写到菜单所在区域时,由于页面中的菜单将书写的区域占据了便无法再继续书写;如果要在菜单所在的区域内进行书写操作,则必须手动地将菜单移开或者将菜单关闭。此时,若不移动或关闭菜单,则书写区域不能被很好的利用,且影响书写的美观性;若移动或关闭菜单,则必须手动进行,操作极为不便,且会打断书写的连贯性
发明内容
本发明实施例的目的在于提供一种悬浮菜单的自动移动方法和装置,实现悬浮菜单的自动移动,以更好地利用页面区域,改善电子白板的书写体验。
为了实现上述目的,本发明提供了一种悬浮菜单的自动移动方法,包括:
获取电子白板页面中的元素以及悬浮菜单的实时位置坐标;
根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞;
在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
在一种优选的实施方式当中,所述元素为点元素;
所述获取电子白板页面中的元素以及悬浮菜单的实时位置坐标,具体为:
获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
在另一种优选的实施方式当中,所述元素为区域元素;
所述获取电子白板页面中的元素以及悬浮菜单的实时位置坐标,具体为:
获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
优选地,所述根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞,具体为:
根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。
优选地,所述在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置,包括:
当所述元素位于所述电子白板页面的左半侧,并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移;
当所述元素位于所述电子白板页面的右半侧,并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移;
当所述元素位于所述电子白板页面的上半侧,并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移;
当所述元素位于所述电子白板页面的下半侧,并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
相应地,本发明还提供了一种悬浮菜单的自动移动装置,包括:
坐标获取模块,用于获取电子白板页面中的元素以及悬浮菜单的实时位置坐标;
碰撞检测模块,用于根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞;
菜单移动模块,用于在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
在一种优选的实施方式当中,所述元素为点元素;
所述坐标获取模块包括第一坐标获取单元,用于获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
在另一种优选的实施方式当中,所述元素为区域元素;
所述坐标获取模块包括第二坐标获取单元,用于获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
优选地,所述碰撞检测模块包括:
碰撞检测单元,用于根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。
优选地,所述菜单移动模块包括:
右移单元,用于当所述元素位于所述电子白板页面的左半侧,并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移;
左移单元,用于当所述元素位于所述电子白板页面的右半侧,并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移;
下移单元,用于当所述元素位于所述电子白板页面的上半侧,并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移;
上移单元,用于当所述元素位于所述电子白板页面的下半侧,并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
本发明通过获取电子白板页面中的元素以及悬浮菜单的实时位置坐标;根据获取的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞;在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。采用本发明,可在页面元素与悬浮菜单发生冲突时自动调整悬浮菜单的位置,以充分利用被悬浮菜单遮挡的页面区域,有利于提高书写的效率,改善书写体验。
图1是本发明提供的悬浮菜单的自动移动方法的一个实施例的流程图;
图2是本发明提供的电子白板页面示意图;
图3是本发明提供的悬浮菜单的自动移动装置的一个实施例的装置结构图。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1,是本发明提供的悬浮菜单的自动移动方法的一个实施例的流程图。
所述悬浮菜单的自动移动方法包括步骤S1~S3:
S1,获取电子白板页面中的元素以及悬浮菜单的实时位置坐标。
S2,根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞。
S3,在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
其中,所述悬浮菜单为悬浮在电子白板页面之上的设置菜单,所述元素为电子白板页面中的任意对象。
在一种优选的实施方式当中,所述元素为点元素。所述点元素为区别于区域元素而言的对象,可以为白板页面中的一点或者可近似可看作一点的元素。
当所述元素为点元素时,所述步骤S1具体为:
获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
如图2所示,电子白板页面21上设置有悬浮菜单22,设白板页面21的左上角为坐标原点O(0,0),白板页面21的右下角为白板页面的最大坐标M(xm,ym),所述点元素可以为笔迹23的当前书写点A(x0,y0),所述悬浮菜单22为矩形菜单,获取的所述悬浮菜单22的一组对角顶点的坐标为右上角B(x1,y1)和左下角C(x2,y2)。本领域技术人员可以理解,在具体实施当中,也可以采用悬浮菜单22的另一组对角顶点(即左上角和右下角)的坐标,本发明对此不作限定。
在另一种优选的实施方式当中,所述元素为区域元素。所述区域元素为在白板页面中占据一定区域的元素,所述区域优选为矩形区域。
当所述元素为区域元素时,所述步骤S1具体为:
获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
如图2所示,所述区域元素可以为白板页面21中的文本框24,本实施例中获取的所述区域元素24的一组对角顶点的坐标为右上角E(x3,y3)和左下角F(x4,y4),获取的所述悬浮菜单22的一组对角顶点的坐标为右上角B(x1,y1)和左下角C(x2,y2)。
为进一步提高碰撞检测的灵敏度和可靠性,可预先设置碰撞间隔值,在所述点元素与所述悬浮菜单的距离小于所述碰撞间隔值时,即判定二者发生碰撞。所述步骤S2具体为:
根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。
如图2所示,若所述元素为点元素A,即在具体实施当中,当检测到x0∈[x2-d,x1+d],并且y0∈[y1-d,y2+d]时,则判定二者发生碰撞,需要对悬浮菜单进行移动;否则,判定二者未发生碰撞,无需对悬浮菜单进行移动。其中,d为预先设置的碰撞间隔值。
碰撞间隔值d的大小可根据实际需要进行选择,本发明对此不作限定。本实施例中,优
选d=5。
本发明通过获取电子白板页面中的元素以及悬浮菜单的实时位置坐标。根据获取的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞。在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。采用本发明,可在页面元素与悬浮菜单发生冲突时自动调整悬浮菜单的位置,以充分利用被悬浮菜单遮挡的页面区域,有利于提高书写的效率,改善书写体验。
进一步地,所述步骤S3包括:
当所述元素位于所述电子白板页面的左半侧,并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移。
当所述元素位于所述电子白板页面的右半侧,并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移。
当所述元素位于所述电子白板页面的上半侧,并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移。
当所述元素位于所述电子白板页面的下半侧,并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
在具体实施当中,可通过获取悬浮菜单的高度h和宽度w以及电子白板页面的最大坐标M(xm,ym),并结合所述悬浮菜单的位置坐标,以判断所述悬浮菜单的四周是否具有可供其移动的空间。具体地,若w<xm-x2,则说明所述悬浮菜单的右方具有可供其移动的页面空间,在需要移动悬浮菜单时可向右侧移动。若w<x1,则说明所述悬浮菜单的左方具有可供其移动的页面空间,在需要移动悬浮菜单时可向左侧移动。若h<ym-y1,则说明所述悬浮菜单的下方具有可供其移动的页面空间,在需要移动悬浮菜单时可向下移动。若h<y2,则说明所述悬浮菜单的上方具有可供其移动的页面空间,在需要移动悬浮菜单时可向上移动。
本发明还通过获取元素在电子白板页面中所处的位置来判断悬浮菜单的移动方向。在具体实施当中,所述元素在电子白板页面中所处的位置(即上、下、左、右半侧),可通过所述元素的几何中心在所述电子白板页面中的位置来判断。具体地,当所述元素的中心位于所述电子白板页面的左半侧,即当元素中心的x坐标小于xm/2时,则将所述悬浮菜单右移。反之,当所述元素中心位于所述电子白板页面的右半侧,即当元素中心的x坐标大于xm/2时,则将所述悬浮菜单左移。同理地,当所述元素中心位于所述电子白板页面的上半侧,即当元素中心的y坐标小于ym/2时,则将所述悬浮菜单下移。反之,当所述元素中心位于所述电子白板页面的下半侧,即当元素中心的y坐标大于ym/2时,则将所述悬浮菜单上移。所述悬浮菜单移动的距离,以使得悬浮菜单与元素之间的距离稍大于预设的碰撞间隔为准,本发明对此不
作限定,本领域技术人员可根据具体需要进行设置。如图2所示,当所述元素为点元素A时,所述元素中心的坐标与所述点元素的坐标相同,均为(x0,y0)。而当所述元素为区域元素24时,则所述元素中心的坐标为((x3+x4)/2,(y3+y4)/2)或者(x4+wA/2,y3+hA/2),其中,wA为所述区域元素的宽度,hA为所述区域元素的高度。
在具体实施当中,既可以先判断是否进行左右移动,当无法通过左右移动躲避碰撞后,再进行上下移动的判断;也可以先判断是否进行上下移动,当无法通过上下移动躲避碰撞后,再进行左右移动的判断。更优地,可同时对上下左右的移动方向进行判断,此时悬浮菜单的最终移动方向为四个方向判断结果的向量叠加。
本发明通过移动方向的判断,可获取悬浮菜单的最优移动路径,有利于实现对白板页面的最优化利用。采用本发明提供悬浮菜单的自动移动方法,在电子白板页面上有悬浮菜单存在的情况下,用户在白板上进行书写操作,当书写至菜单附近时,若发现书写点与菜单有碰撞,则此时菜单将自动判断移动方向并进行移动,用户可以继续进行书写,从而提升用户在书写方面体验。
参见图3,是本发明提供的悬浮菜单的自动移动装置的一个实施例的结构图。本实施例的基本原理与图1所示实施例一致,本实施例中未详述之处可参见图1所示实施例中的相关描述。
如图3所示,所述悬浮菜单的自动移动装置包括:
坐标获取模块31,用于获取电子白板页面中的元素以及悬浮菜单的实时位置坐标。
碰撞检测模块32,用于根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞。
菜单移动模块33,用于在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
在一种优选的实施方式当中,所述元素为点元素。具体地,所述点元素可以为笔迹的当前书写点。
所述坐标获取模块31包括第一坐标获取单元311,用于获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
在另一种优选的实施方式当中,所述元素为区域元素。具体地,所述区域元素可以为文本框。
所述坐标获取模块31包括第二坐标获取单元312,用于获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
所述碰撞检测模块32包括碰撞检测单元321,用于根据获取的所述元素以及所述悬浮菜
单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。进一步地,所述菜单移动模块33包括:
右移单元331,用于当所述元素位于所述电子白板页面的左半侧并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移。
左移单元332,用于当所述元素位于所述电子白板页面的右半侧并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移。
下移单元333,用于当所述元素位于所述电子白板页面的上半侧并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移。
上移单元334,用于当所述元素位于所述电子白板页面的下半侧并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
综上所述,现有方案当中,若电子白板页面中的元素与页面中的悬浮菜单发生冲突碰撞时,必须要手动移动菜单或放弃菜单区域,页面利用率较低,书写体验较差。本发明通过获取电子白板页面中的元素以及悬浮菜单的实时位置坐标。根据获取的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞。在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。采用本发明,可在页面元素与悬浮菜单发生冲突时自动调整悬浮菜单的位置,以充分利用被悬浮菜单遮挡的页面区域,有利于提高书写的效率,改善书写体验。
需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本发明提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本发明而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,
RandomAccess Memory)、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。
Claims (10)
- 一种悬浮菜单的自动移动方法,其特征在于,包括:获取电子白板页面中的元素以及悬浮菜单的实时位置坐标;根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞;在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
- 如权利要求1所述的悬浮菜单的自动移动方法,其特征在于,所述元素为点元素;所述获取电子白板页面中的元素以及悬浮菜单的实时位置坐标,具体为:获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
- 如权利要求1所述的悬浮菜单的自动移动方法,其特征在于,所述元素为区域元素;所述获取电子白板页面中的元素以及悬浮菜单的实时位置坐标,具体为:获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
- 如权利要求1所述的悬浮菜单的自动移动方法,其特征在于,所述根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞,具体为:根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。
- 如权利要求1~4任一项所述的悬浮菜单的自动移动方法,其特征在于,所述在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置,包括:当所述元素位于所述电子白板页面的左半侧,并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移;当所述元素位于所述电子白板页面的右半侧,并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移;当所述元素位于所述电子白板页面的上半侧,并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移;当所述元素位于所述电子白板页面的下半侧,并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
- 一种悬浮菜单的自动移动装置,其特征在于,包括:坐标获取模块,用于获取电子白板页面中的元素以及悬浮菜单的实时位置坐标;碰撞检测模块,用于根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素是否与所述悬浮菜单发生碰撞;菜单移动模块,用于在发生碰撞时,将所述悬浮菜单移动至不与所述元素发生碰撞的位置。
- 如权利要求6所述的悬浮菜单的自动移动装置,其特征在于,所述元素为点元素;所述坐标获取模块包括第一坐标获取单元,用于获取所述点元素的坐标以及所述悬浮菜单的一组对角顶点的坐标。
- 如权利要求6所述的悬浮菜单的自动移动装置,其特征在于,所述元素为区域元素;所述坐标获取模块包括第二坐标获取单元,用于获取所述区域元素的一组对角顶点的坐标以及所述悬浮菜单的一组对角顶点的坐标。
- 如权利要求6所述的悬浮菜单的自动移动装置,其特征在于,所述碰撞检测模块包括:碰撞检测单元,用于根据获取的所述元素以及所述悬浮菜单的位置坐标,判断所述元素与所述悬浮菜单之间的距离是否小于预设的碰撞间隔值;若是,则判定所述元素与所述悬浮菜单发生碰撞;若否,则判定所述元素与所述悬浮菜单未发生碰撞。
- 如权利要求6~9任一项所述的悬浮菜单的自动移动方法,其特征在于,所述菜单移动模块包括:右移单元,用于当所述元素位于所述电子白板页面的左半侧,并且所述悬浮菜单的右方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单右移;左移单元,用于当所述元素位于所述电子白板页面的右半侧,并且所述悬浮菜单的左方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单左移;下移单元,用于当所述元素位于所述电子白板页面的上半侧,并且所述悬浮菜单的下方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单下移;上移单元,用于当所述元素位于所述电子白板页面的下半侧,并且所述悬浮菜单的上方具有可供所述悬浮菜单移动的页面空间时,将所述悬浮菜单上移。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610513736.8A CN106201494A (zh) | 2016-06-30 | 2016-06-30 | 一种悬浮菜单的自动移动方法和装置 |
| CN201610513736.8 | 2016-06-30 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018000786A1 true WO2018000786A1 (zh) | 2018-01-04 |
Family
ID=57463049
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2016/113331 Ceased WO2018000786A1 (zh) | 2016-06-30 | 2016-12-30 | 一种悬浮菜单的自动移动方法和装置 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN106201494A (zh) |
| WO (1) | WO2018000786A1 (zh) |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106201494A (zh) * | 2016-06-30 | 2016-12-07 | 广州视睿电子科技有限公司 | 一种悬浮菜单的自动移动方法和装置 |
| CN108762628B (zh) * | 2018-04-23 | 2020-10-02 | 广州视源电子科技股份有限公司 | 页面元素移动显示方法、装置、终端设备及存储介质 |
| CN110968291B (zh) * | 2018-09-29 | 2023-08-15 | 中国移动通信集团浙江有限公司 | 一种基于最优树调整应用程序功能菜单的方法及装置 |
| CN112882775A (zh) * | 2019-11-29 | 2021-06-01 | 北京京东尚科信息技术有限公司 | 页面模板自适应调整的方法和装置 |
| CN114003123B (zh) * | 2020-07-28 | 2025-05-06 | 华为技术有限公司 | 控件移动方法和电子设备 |
| CN114253433B (zh) | 2020-09-24 | 2024-09-24 | 荣耀终端有限公司 | 一种动态元素控制方法、电子设备和计算机可读存储介质 |
| CN114491701B (zh) * | 2021-09-30 | 2025-06-10 | 居然设计家(上海)科技有限公司 | 界面元素防碰撞方法、提供界面的方法及系统 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101315586A (zh) * | 2008-07-21 | 2008-12-03 | 贾颖 | 一种用于交互式电子白板的电子笔及其交互控制方法 |
| CN102999232A (zh) * | 2012-11-17 | 2013-03-27 | 武汉市腾亚科技有限公司 | 一种实现超大尺寸交互电子白板的仿鼠标交互方法 |
| CN202870746U (zh) * | 2012-09-12 | 2013-04-10 | 杭州喜马拉雅信息科技有限公司 | 一种交互式无线触控电子笔及白板系统 |
| WO2015080386A1 (ko) * | 2013-11-28 | 2015-06-04 | 주식회사 가온소프트 | 멀티플랫폼 환경의 실시간 웹 화이트보드 제공방법 |
| CN104793838A (zh) * | 2014-01-20 | 2015-07-22 | 中兴通讯股份有限公司 | 一种实现悬浮显示的方法及装置 |
| CN106201494A (zh) * | 2016-06-30 | 2016-12-07 | 广州视睿电子科技有限公司 | 一种悬浮菜单的自动移动方法和装置 |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5879536B2 (ja) * | 2012-01-18 | 2016-03-08 | パナソニックIpマネジメント株式会社 | 表示装置および表示方法 |
| CN105302408A (zh) * | 2014-06-24 | 2016-02-03 | 腾讯科技(深圳)有限公司 | 对悬浮按钮的位置进行调节的方法、装置及终端 |
| CN104793883A (zh) * | 2015-03-26 | 2015-07-22 | 广州视睿电子科技有限公司 | 触摸屏的书写区域处理方法和系统 |
| CN104731454A (zh) * | 2015-03-31 | 2015-06-24 | 联想(北京)有限公司 | 一种信息处理方法和电子设备 |
| CN105005430B (zh) * | 2015-07-17 | 2019-05-14 | 深圳市金立通信设备有限公司 | 一种窗口显示方法及终端 |
-
2016
- 2016-06-30 CN CN201610513736.8A patent/CN106201494A/zh active Pending
- 2016-12-30 WO PCT/CN2016/113331 patent/WO2018000786A1/zh not_active Ceased
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101315586A (zh) * | 2008-07-21 | 2008-12-03 | 贾颖 | 一种用于交互式电子白板的电子笔及其交互控制方法 |
| CN202870746U (zh) * | 2012-09-12 | 2013-04-10 | 杭州喜马拉雅信息科技有限公司 | 一种交互式无线触控电子笔及白板系统 |
| CN102999232A (zh) * | 2012-11-17 | 2013-03-27 | 武汉市腾亚科技有限公司 | 一种实现超大尺寸交互电子白板的仿鼠标交互方法 |
| WO2015080386A1 (ko) * | 2013-11-28 | 2015-06-04 | 주식회사 가온소프트 | 멀티플랫폼 환경의 실시간 웹 화이트보드 제공방법 |
| CN104793838A (zh) * | 2014-01-20 | 2015-07-22 | 中兴通讯股份有限公司 | 一种实现悬浮显示的方法及装置 |
| CN106201494A (zh) * | 2016-06-30 | 2016-12-07 | 广州视睿电子科技有限公司 | 一种悬浮菜单的自动移动方法和装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106201494A (zh) | 2016-12-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018000786A1 (zh) | 一种悬浮菜单的自动移动方法和装置 | |
| US8976136B2 (en) | Proximity-aware multi-touch tabletop | |
| US9335836B2 (en) | Method and electronic apparatus for realizing virtual handwriting input | |
| CN103984502B (zh) | 一种截取屏幕内容的方法及便携式终端 | |
| CN108874292B (zh) | 批注显示方法、装置以及智能交互平板 | |
| CN111580687B (zh) | 数据处理方法、装置和智能交互设备 | |
| CN109460073B (zh) | 一种音频设备定向显示方法、装置和音频设备 | |
| CN106445386B (zh) | 一种笔迹显示方法及装置 | |
| WO2017219645A1 (zh) | 一种触屏终端的画布显示方法及装置 | |
| WO2021098832A1 (zh) | 元素控制方法、装置、设备及存储介质 | |
| CN101183284A (zh) | 一种移动终端手写输入方法、装置及移动终端 | |
| CN106780565A (zh) | 一种基于光流与k‑means聚类的多学生起坐检测方法 | |
| CN103919663A (zh) | 盲人户外环境感知方法 | |
| WO2017080258A1 (zh) | 一种触摸菜单的控制方法及系统 | |
| CN109191547A (zh) | 元素吸附方法、装置、设备和存储介质 | |
| WO2017101496A1 (zh) | 一种手势识别方法及装置 | |
| CN104142760B (zh) | 交互式投影设备及其交互笔的定位方法 | |
| US20150253861A1 (en) | Detecting device and detecting method | |
| CN107817935A (zh) | 应用界面的显示方法、装置、终端和计算机可读存储介质 | |
| WO2016065551A1 (en) | Whiteboard and document image detection method and system | |
| JP2018067298A (ja) | 手書き内容編集装置および手書き内容編集方法 | |
| KR20130015973A (ko) | 소실점 및 광류를 기반으로 한 검출 장치 및 검출 방법 | |
| JP7019967B2 (ja) | 表示制御プログラム、表示制御方法及び表示制御装置 | |
| JP5675196B2 (ja) | 情報処理装置及びその制御方法 | |
| WO2022206171A1 (zh) | 远程书写显示的方法、装置和存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16907173 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 16907173 Country of ref document: EP Kind code of ref document: A1 |