Dynamic adjustment method, system and related equipment for table parallel display area

文档序号:1113338 发布日期:2020-09-29 浏览:7次 中文

阅读说明:本技术 一种表格并行显示区域动态调整方法、系统及相关设备 (Dynamic adjustment method, system and related equipment for table parallel display area ) 是由 杜传文 全志渊 吴桂芳 于 2020-07-15 设计创作,主要内容包括:本发明实施例提供了一种表格并行显示区域动态调整方法、系统及相关设备,实现了表格合并行中的显示内容位置的动态调整,提高用户体验。本发明实施例方法包括:获取合并行的初始高度megreHeight及表格中未合并的单行高度height;当监听到表格滚动事件时,获取所述合并行未被遮挡的显示区域的高度length,并判断所述length与megreHeight及height的大小;当所述length小于所述megreHeight且大于所述height时,设置所述合并行的当前高度参数值为小于等于所述length且大于所述height的任意值,以使得合并行中的文字根据合并行的当前高度参数值调整显示位置至未被遮挡的显示区域。(The embodiment of the invention provides a method, a system and related equipment for dynamically adjusting a table parallel display area, which realize dynamic adjustment of display content positions in table combination and parallel, and improve user experience. The method provided by the embodiment of the invention comprises the following steps: acquiring the combined initial height megreHeight and the uncombined single-row height in the table; when a table rolling event is monitored, acquiring the length of the parallel and unshielded display area, and judging the size of the length, megreHeight and height; and when the length is less than the megreHeight and greater than the height, setting the current height parameter value of the combined parallel to be an arbitrary value which is less than or equal to the length and greater than the height, so that the characters in the combined parallel adjust the display position to the non-shielded display area according to the current height parameter value of the combined parallel.)

1. A method for dynamically adjusting a table parallel display area is characterized by comprising the following steps:

acquiring the initial height megreHeight of the table in parallel and the height of an uncombined single line in the table;

when a table rolling event is monitored, acquiring the length of the parallel and unshielded display area, and judging the size of the length, megreHeight and height;

and when the length is less than the megreHeight and greater than the height, setting the current height parameter value of the combined parallel to be an arbitrary value which is less than or equal to the length and greater than the height, so that the characters in the combined parallel adjust the display position to the non-shielded display area according to the current height parameter value of the combined parallel.

2. The method of claim 1, wherein the obtaining the height length of the unobstructed display area of the combined row when the table is scrolled upwards comprises:

calling a Document Object Model (DOM) element acquisition function to acquire the height of the lower frame of the combined line;

calling a Document Object Model (DOM) element to obtain the height of an upper frame of the form;

and subtracting the height of the lower border of the combined and parallel display area from the height of the upper border of the table to obtain the height length of the display area which is not shielded by the combined and parallel display area.

3. The method of claim 1, wherein the obtaining the height length of the unobstructed display area of the combined row when the table is scrolled downward comprises:

calling a Document Object Model (DOM) element acquisition function to acquire the height of the upper frame of the combined line;

calling a Document Object Model (DOM) element to obtain the height of a lower border of the form;

and subtracting the height of the lower frame of the table from the height of the upper frame of the combined and parallel display area to obtain the height length of the non-shielded display area of the combined and parallel display area.

4. The method of any of claims 1 to 3, further comprising:

and when the length is less than or equal to the height, setting the current height parameter value of the combined line as the height.

5. The method according to any one of claims 1 to 3, wherein said obtaining the combined initial height megreHeight and the non-combined single-row height in the table comprises:

and calling a DOM element acquisition function to acquire the merged initial height megreHeight and the un-merged single-row height in the table.

6. A system for dynamically adjusting a parallel display area of a table, comprising:

the first acquisition module is used for acquiring the combined and parallel initial height megreHeight and the non-combined single-row height in the table;

the second obtaining module is used for obtaining the length of the parallel and unshielded display area when a table rolling event is monitored, and judging the length, the megreHeight and the height;

and the first setting module is used for setting the current height parameter value of the combined parallel to be any value which is less than or equal to the length and greater than the height when the length is less than the megreHeight and greater than the height, so that the characters in the combined parallel can adjust the display position to the non-shielded display area according to the current height parameter value of the combined parallel.

7. The system of claim 6, wherein the second obtaining module comprises, when the table is scrolled upwards:

the first calling unit is used for calling a Document Object Model (DOM) element acquisition function to acquire the height of the lower frame of the combined line;

the second calling unit is used for calling a Document Object Model (DOM) element to acquire the height of the upper frame of the form;

and the first calculation unit subtracts the height of the lower border of the combined and parallel display area from the height of the upper border of the table to obtain the height length of the unshielded display area of the combined and parallel display area.

8. The system of claim 6, wherein the second obtaining module comprises, when the form is scrolled downward:

the third calling unit is used for calling a Document Object Model (DOM) element acquisition function to acquire the height of the upper frame of the combined and parallel object;

the fourth calling unit is used for calling a Document Object Model (DOM) element to acquire the height of the lower border of the form;

and the second calculation unit subtracts the height of the lower frame of the table from the height of the upper frame of the combined and parallel display area to obtain the height length of the unshielded display area of the combined and parallel display area.

9. A computer arrangement, characterized in that the computer arrangement comprises a processor for implementing the steps of the method according to any one of claims 1 to 5 when executing a computer program stored in a memory.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program when executed by a processor implementing the steps of the method according to any one of claims 1 to 5.

Technical Field

The invention relates to the technical field of dynamic adjustment of a table parallel display area, in particular to a method, a system and related equipment for dynamically adjusting the table parallel display area.

Background

The form is a visual communication mode and a means for organizing and arranging data. People have widely used various forms in communication, scientific research and data analysis activities. For example, a web page version of the form, a form in Microsoft Office and WPS software.

A common function in existing forms is to merge two or more rows into one row, as shown in fig. 1, when the form is scrolled up and down, the merged row scrolls along with the form. Since the height of the merged row is greater than the height of the single row, and the display format of the text content in the merged row is fixed (for example, centered display), when the merged row scrolls along with the table, a scene as in fig. 2 appears, that is, the text "item a" in the merged row is invisible, and only the categories "class D and class E" contained in the merged row are visible, in order to query the belonging items of class D and class E, the table needs to be scrolled upwards again to view the text in the merged row, which is not good for the user experience.

Disclosure of Invention

The embodiment of the invention provides a method, a system and related equipment for dynamically adjusting a table parallel display area, which are used for dynamically adjusting the position of display content in table parallel and improving user experience.

A first aspect of an embodiment of the present invention provides a method for dynamically adjusting a table parallel display area, where the method may include:

acquiring the initial height megreHeight of the table in parallel and the height of an uncombined single line in the table;

when a table rolling event is monitored, acquiring the length of the parallel and unshielded display area, and judging the size of the length, megreHeight and height;

and when the length is less than the megreHeight and greater than the height, setting the current height parameter value of the combined parallel to be an arbitrary value which is less than or equal to the length and greater than the height, so that the characters in the combined parallel adjust the display position to the non-shielded display area according to the current height parameter value of the combined parallel.

Optionally, as a possible implementation manner, in the method for dynamically adjusting a parallel table display area in the embodiment of the present invention, when the table is scrolled upwards, the obtaining the height length of the parallel and non-occluded display area may include:

calling a Document Object Model (DOM) element acquisition function to acquire the height of the lower frame of the combined line;

calling a Document Object Model (DOM) element to obtain the height of an upper frame of the form;

and subtracting the height of the lower border of the combined and parallel display area from the height of the upper border of the table to obtain the height length of the display area which is not shielded by the combined and parallel display area.

Optionally, as a possible implementation manner, in the method for dynamically adjusting a parallel table display area in the embodiment of the present invention, when the table scrolls downwards, the obtaining the height length of the parallel and non-occluded display area includes:

calling a Document Object Model (DOM) element acquisition function to acquire the height of the upper frame of the combined line;

calling a Document Object Model (DOM) element to obtain the height of a lower border of the form;

and subtracting the height of the lower frame of the table from the height of the upper frame of the combined and parallel display area to obtain the height length of the non-shielded display area of the combined and parallel display area.

Optionally, as a possible implementation manner, the method for dynamically adjusting a table parallel display area in the embodiment of the present invention may further include:

and when the length is less than or equal to the height, setting the current height parameter value of the combined line as the height.

Optionally, as a possible implementation manner, in the method for dynamically adjusting a table parallel display area in an embodiment of the present invention, the acquiring an initial height megreHeight for combining and parallel display areas and a single-line height for not combining in a table may include:

and calling a DOM element acquisition function to acquire the merged initial height megreHeight and the un-merged single-row height in the table.

A second aspect of the present invention provides a system for dynamically adjusting a table parallel display area, where the system may include:

the first acquisition module is used for acquiring the combined and parallel initial height megreHeight and the non-combined single-row height in the table;

the second obtaining module is used for obtaining the length of the parallel and unshielded display area when a table rolling event is monitored, and judging the length, the megreHeight and the height;

and the first setting module is used for setting the current height parameter value of the combined parallel to be any value which is less than or equal to the length and greater than the height when the length is less than the megreHeight and greater than the height, so that the characters in the combined parallel can adjust the display position to the non-shielded display area according to the current height parameter value of the combined parallel.

Optionally, as a possible implementation manner, when the table is scrolled upwards, the second obtaining module may include:

the first calling unit is used for calling a Document Object Model (DOM) element acquisition function to acquire the height of the lower frame of the combined line;

the second calling unit is used for calling a Document Object Model (DOM) element to acquire the height of the upper frame of the form;

and the first calculation unit subtracts the height of the lower border of the combined and parallel display area from the height of the upper border of the table to obtain the height length of the unshielded display area of the combined and parallel display area.

Optionally, as a possible implementation manner, when the table is scrolled downward, the second obtaining module may include:

the third calling unit is used for calling a Document Object Model (DOM) element acquisition function to acquire the height of the upper frame of the combined and parallel object;

the fourth calling unit is used for calling a Document Object Model (DOM) element to acquire the height of the lower border of the form;

and the second calculation unit subtracts the height of the lower frame of the table from the height of the upper frame of the combined and parallel display area to obtain the height length of the unshielded display area of the combined and parallel display area.

Optionally, as a possible implementation manner, the system for dynamically adjusting a table parallel display area in the embodiment of the present invention may further include:

and the second setting module is used for setting the current height parameter value of the combined line as the height when the length is less than or equal to the height.

Optionally, as a possible implementation manner, the first obtaining module in the embodiment of the present invention may include:

and the calling unit is used for calling the DOM element acquisition function to acquire the combined and parallel initial height megreHeight and the uncombined single-line height in the table.

A third aspect of embodiments of the present invention provides a computer apparatus, which includes a processor, and the processor is configured to implement the steps in any one of the possible implementation manners of the first aspect and the first aspect when executing a computer program stored in a memory.

A fourth aspect of the embodiments of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in any one of the possible implementations of the first aspect and the first aspect.

According to the technical scheme, the embodiment of the invention has the following advantages:

in the embodiment of the invention, the combined and parallel initial height megreHeight and the non-combined single-row height in the table can be obtained in advance; when a table rolling event is monitored, the height length of a parallel non-shielded display area can be acquired, and the sizes of the length, megreHeight and height are judged; and when the length is less than megreHeight and greater than height, setting the current height parameter value of the combined parallel to be any value which is less than or equal to the length and greater than height, so that the characters in the combined parallel adjust the display position according to the current height parameter value of the combined parallel. Compared with the prior art, the embodiment of the invention realizes the dynamic adjustment of the display content position in the form combination and parallel, and improves the user experience.

Drawings

FIG. 1 is a diagram illustrating an initial stage of scrolling a table in the prior art;

FIG. 2 is a diagram illustrating a stage of a table scrolling upward to a merge line where a character is occluded in the prior art;

FIG. 3 is a schematic diagram of an embodiment of a method for dynamically adjusting a table parallel display area according to an embodiment of the present invention;

FIG. 4 is a diagram illustrating dynamic adjustment of the position of display content in a table and row during scrolling of the table in an embodiment of the present invention;

FIG. 5 is a diagram of an embodiment of a table parallel display area dynamic adjustment method according to the present invention;

FIG. 6 is a schematic diagram of an embodiment of a system for dynamically adjusting a table parallel display area according to an embodiment of the present invention;

FIG. 7 is a diagram of a computer device according to an embodiment of the present invention.

Detailed Description

The embodiment of the invention provides a method, a system and related equipment for dynamically adjusting a table parallel display area, which are used for dynamically adjusting the position of display content in table parallel and improving user experience.

In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:继电保护定值项图形组态建模方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!