CN105094622B - Adjust the method and apparatus of form col width - Google Patents

Adjust the method and apparatus of form col width Download PDF

Info

Publication number
CN105094622B
CN105094622B CN201510566228.1A CN201510566228A CN105094622B CN 105094622 B CN105094622 B CN 105094622B CN 201510566228 A CN201510566228 A CN 201510566228A CN 105094622 B CN105094622 B CN 105094622B
Authority
CN
China
Prior art keywords
col width
information
operating point
current location
col
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.)
Active
Application number
CN201510566228.1A
Other languages
Chinese (zh)
Other versions
CN105094622A (en
Inventor
贾春乐
陈鹏飞
赵启
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Upper Marine Infotech Share Co Ltd Of Interrogating
Original Assignee
Upper Marine Infotech Share Co Ltd Of Interrogating
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Upper Marine Infotech Share Co Ltd Of Interrogating filed Critical Upper Marine Infotech Share Co Ltd Of Interrogating
Priority to CN201510566228.1A priority Critical patent/CN105094622B/en
Publication of CN105094622A publication Critical patent/CN105094622A/en
Application granted granted Critical
Publication of CN105094622B publication Critical patent/CN105094622B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • User Interface Of Digital Computer (AREA)

Abstract

The purpose of the application is to provide a kind of method and apparatus for adjusting form col width.Specifically, determine that the operating point is in triggering region according to the current location information of the operating point;After the adjusting trigger action that the operating point performs in the triggering region is got, the col width information of form is obtained according to the current location information of the current location information of the operating point and the correlation unit lattice;According to form described in the col width presentation of information of the form.Compared with prior art, the technical solution of the application determines that the operating point is in triggering region according to the current location information of operating point, the regulating calculation of col width is only carried out when operating point enters triggering region, the variation of original DOM structure will not be caused, so intrusive mood is than relatively low, it will not conflict with other plug-in units for acting on form, so adaptability is relatively good, additionally can adapt to elastic layout.

Description

Adjust the method and apparatus of form col width
Technical field
This application involves computer realm more particularly to a kind of method and apparatus for adjusting form col width.
Background technology
With the extensive use of computer and Internet technology, the content in webpage is increasingly abundanter.For in webpage Form, in particular by HTML's (Hyper Text Markup Language, hypertext markup language)<table>Label is determined The form of justice, the mode for adjusting its col width at present mainly binds corresponding event by JavaScript, in event response letter Its col width is operated in number, but because the details difference of realization method is primarily present following deficiency:
1st, the layout types adapted to are relatively simple, can only adapt to webpage fixed width layout, can not adapt to elastic layout.It is realized The position for focusing on obtaining the width each arranged and column split line of thought, with transparent element in a manner of absolute fix It is placed on dragging point, is to pull transparent location element in fact during dragging, then according to the change in location of transparent elements, again Computation sheet col width.So if adaptive elasticity layout, causes list cell case in browser window size variation When putting variation, the position of transparent elements does not change, so after form size is according to elastic layout change, the meter of col width Calculation will go wrong.
2nd, intrusive mood is too strong, easily conflicts with other plug-in units for acting on form.It is this to be achieved in that in order to avoid A kind of situation, and the element of positioning is placed in each cell of gauge outfit, although so solving the element under elasticity layout Orientation problem, but because changing DOM (Document Object Model, DOM Document Object Model) structure inside form, It may cause the failure of original binding elements.
3rd, when widening a certain row, form integrally can also broaden, can cause the overall width of form change rather than Form overall dimensions is made to be always maintained at shared size in a reservoir during loading, original layout type can be destroyed.
4th, it can not solve the problems, such as to hide row, when there are hiding row in the column split line both sides of dragging, cause to pull and lose Effect.
5th, it is very big that webpage transverse width can not be adapted to, have the situation of horizontal scroll bar, be at this moment present with Wrong localization.
6th, can not solve the problem of head of form it is fixed in the case of col width pull.
The content of the invention
The purpose of the application is to provide a kind of method and apparatus for adjusting form col width.
To achieve the above object, this application provides a kind of method for adjusting form col width, this method includes:
Determine that the operating point is in triggering region according to the current location information of the operating point;
After the adjusting trigger action that the operating point performs in the triggering region is got, according to the operation The current location information of point and the current location information of the correlation unit lattice obtain the col width information of form;
According to form described in the col width presentation of information of the form.
Further, the form according to the col width presentation of information of the form, including:
When getting the adjusting termination operation that the operating point performs in the triggering region, according to current time Form described in the col width presentation of information of the form;Or
According to form described in the col width presentation of information of the form at each moment, until getting the operating point in institute It states the adjusting performed in triggering region and terminates operation.
Further, the current location information of the operating point is included between the operating point and the window one side of webpage First distance, the triggering region include the area in the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Domain;
Determine that the operating point is in triggering region according to the current location information of the operating point, including:
If whether first distance and the difference of second distance are less than threshold value, it is determined that the operating point is currently at triggering In region, wherein the window of separator bar and the webpage of the second distance between the adjacent Visible Cells Only of any two The distance of one side.
Further, the triggering region includes the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Interior region, the correlation unit lattice include two adjacent Visible Cells Onlies of the triggering region both sides;
Form is obtained according to the current location information of the current location information of the operating point and the correlation unit lattice Col width information, including:
It is related to the current location information calculating of the correlation unit lattice single according to the current location information of the operating point The col width value of first lattice, and obtain the col width value with remaining element lattice in a line;
Using the col width value of the correlation unit lattice and with remaining element lattice in a line col width value as the form row Wide information.
Further, according to the current location information of the operating point and the current location information meter of the correlation unit lattice The col width value of correlation unit lattice is calculated, including:
The current location information of the separator bar of the correlation unit lattice is determined according to the current location information of the operating point;
It is related to the current location information calculating of the correlation unit lattice single according to the current location information of the separator bar The col width value of first lattice.
Further, using the col width value of the correlation unit lattice and with remaining element lattice in a line col width value as described in The col width information of form, including:
The correlation unit lattice and the index value with remaining element lattice in a line are obtained, is established according to index value described in preserving The array of col width information, and using the col width value as the value of corresponding array element in array.
Further, after form described in the col width presentation of information according to the form, further include:
The col width information of the form is converted to the row of each cell by the col width value of each cell in same a line Width values account for the percentage of form overall width.
Further, the form according to the col width presentation of information of the form, including:
If there is fixed gauge outfit, the col width information of the form is copied as to the col width information of the fixed gauge outfit, according to Form described in the col width presentation of information of the form, while fix table according to the col width presentation of information of the fixed gauge outfit Head.
Further, according to the current location information of the operating point determine the operating point be in triggering region it Before, it further includes:
It obtains with the col width value of each cell in a line in the form, and by each cell in described same a line The col width value that col width value is converted to each cell in same a line accounts for the percentage of form overall width.
Further, obtain in the form with the col width value of each cell in a line, including:
If father's attribute of an element of the form or the form is hiding, the attribute is arranged to show, be obtained With the col width value of each cell in a line in the form, then the attribute is arranged to hiding.
According to the another aspect of the application, a kind of equipment for adjusting form col width is additionally provided, which includes:
First device, for determining that the operating point is in triggering region according to the current location information of the operating point;
Second device, for get the operating point in the triggering region adjusting trigger action that performs it Afterwards, the col width for form being obtained according to the current location information of the current location information of the operating point and the correlation unit lattice is believed Breath;
3rd device, for form described in the col width presentation of information according to the form.
Further, the 3rd device, for getting operating point tune for performing in the triggering region When section terminates operation, according to form described in the col width presentation of information of the form at current time;Or according to each moment Form described in the col width presentation of information of the form, until getting the adjusting that the operating point performs in the triggering region Terminate operation.
Further, the current location information of the operating point is included between the operating point and the window one side of webpage First distance, the triggering region include the area in the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Domain;
The first device, if whether being less than threshold value for first distance and the difference of second distance, it is determined that described Operating point is currently in triggering region, wherein separation of the second distance between the adjacent Visible Cells Only of any two Line and the distance of the window one side of the webpage.
Further, the triggering region includes the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Interior region, the correlation unit lattice include two adjacent Visible Cells Onlies of the triggering region both sides;
The second device, including:
2nd 1 module, for get the operating point in the triggering region adjusting trigger action that performs it Afterwards, correlation unit lattice are calculated according to the current location information of the current location information of the operating point and the correlation unit lattice Col width value, and obtain the col width value with remaining element lattice in a line;
Two or two module, for making by the col width value of the correlation unit lattice and with the col width value of remaining element lattice in a line For the col width information of the form.
Further, the 2nd 1 module is in the current location information according to the operating point and the correlation unit lattice When current location information calculates the col width value of correlation unit lattice, described in being determined according to the current location information of the operating point The current location information of the separator bar of correlation unit lattice and the current location information according to the separator bar and the related list The current location information of first lattice calculates the col width value of correlation unit lattice.
Further, the two or two module, for obtaining the correlation unit lattice and with remaining element lattice in a line Index value establishes the array for preserving the col width information according to index value, and using the col width value as corresponding number in array The value of constituent element element.
Further, which further includes:
4th device, for after form described in the col width presentation of information according to the form, by the row of the form The col width value that wide information is converted to each cell by the col width value of each cell in same a line accounts for the percentage of form overall width Than.
Further, the 3rd device, for when there is fixed gauge outfit, the col width information of the form to be copied as The col width information of the fixed gauge outfit, according to form described in the col width presentation of information of the form, while according to the fixed table Gauge outfit is fixed described in the col width presentation of information of head.
Further, which further includes:
5th device, for determining that the operating point is in triggering region according to the current location information of the operating point Before, obtain with the col width value of each cell in a line in the form, and by the row of each cell in described same a line The col width value that width values are converted to each cell in same a line accounts for the percentage of form overall width.
Further, the 5th device is used in the col width value of each cell in obtaining the form with a line When father's attribute of an element in the form or the form is hides, then the attribute is arranged to show, described in acquisition With the col width value of each cell in a line in form, then the attribute is arranged to hiding.
Compared with prior art, the technical solution of the application determines the operating point according to the current location information of operating point In triggering region, the regulating calculation of col width is only carried out when operating point enters triggering region, original DOM will not be caused to tie The variation of structure, so intrusive mood than relatively low, will not conflict, so adaptability is relatively good with other plug-in units for acting on form.
Meanwhile when separator bar both sides have hiding cell, it is used as col width tune by obtaining adjacent Visible Cells Only The foundation calculated is saved, the cell for avoiding hidden state exchanges the influence that nodule fruit brings, and is arrived by obtaining operating point The distance of the window one side of webpage, can as the foundation calculated rather than using foundation of the distance with DOM borders as calculating It is larger and have the situation of horizontal scroll bar to adapt to webpage transverse width, be not in Wrong localization.
In addition, when carrying out col width regulating calculation, using considering two adjacent Visible Cells Onlies simultaneously, and calculating Col width is represented in the form of percentage after finishing, so when widening a row, form will not integrally broaden, and will not break at this time Bad original layout type, and it is adapted to elastic layout.And when there is fixed gauge outfit, it can be by the related col width of form Adjustment is associated with fixed gauge outfit so that fixed gauge outfit can also be adjusted therewith, so as to effectively solve the feelings for having fixed gauge outfit Under condition, col width adjust the problem of.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow chart of method for adjusting form col width provided by the embodiments of the present application;
Fig. 2 is the specific process chart that form col width information is obtained in the method for the adjusting form col width of the present embodiment;
Fig. 3 is a kind of structure diagram of equipment for adjusting form col width provided by the embodiments of the present application;
Fig. 4 be the present embodiment adjusting form col width equipment in second device concrete structure schematic diagram;
Fig. 5 is a kind of structure diagram of preferred equipment for adjusting form col width provided by the embodiments of the present application;
Fig. 6 is the embodiment of the present application form schematic diagram involved when determining that operating point is whether in triggering region;
The same or similar reference numeral represents the same or similar component in attached drawing.
Specific embodiment
The application is described in further detail below in conjunction with the accompanying drawings.
In a typical configuration of this application, terminal, the equipment of service network and trusted party include one or more Processor (CPU), input/output interface, network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only memory (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, magnetic tape disk storage or other magnetic storage apparatus or Any other non-transmission medium, the information that can be accessed by a computing device available for storage.It is defined according to herein, computer Readable medium does not include the data-signal and carrier wave of non-temporary computer readable media (transitory media), such as modulation.
Fig. 1 shows a kind of method for adjusting form col width provided by the embodiments of the present application, and this method comprises the following steps:
Step S101 determines that the operating point is in triggering region according to the current location information of the operating point;
Step S102, after the adjusting trigger action that the operating point performs in the triggering region is got, root The col width information of form is obtained according to the current location information of the operating point and the current location information of the correlation unit lattice;
Step S103, according to form described in the col width presentation of information of the form.
Here, the operating point includes but not limited to the touch location of user on the touchscreen;Or operated by user The correspondence cursor position of the interactive devices such as mouse, trace ball or Trackpad on a display screen.Technical solution root in the present embodiment Determine that the operating point is in triggering region according to the current location information of operating point, only when operating point enters triggering region The regulating calculation of col width is carried out, the variation of original DOM structure will not be caused, so intrusive mood is than relatively low, it will not be with other effects In the plug-in unit conflict of form, so adaptability is relatively good.
Here, it will be appreciated by those skilled in the art that the executive agent of the above method can include but is not limited to user sets The standby, network equipment or user equipment are integrated formed equipment by network with the network equipment.The user equipment include but It is not limited to the realizations such as personal computer, touch control terminal;The network equipment includes but not limited to such as network host, single network and takes The realizations such as business device, multiple network server collection or the set of computers based on cloud computing.Here, cloud is by being based on cloud computing (Cloud Computing a large amount of hosts or network server) are formed, wherein, cloud computing is one kind of Distributed Calculation, loose by a group One virtual machine of the computer collection composition of coupling.
In practical applications, the current location information of the operating point include the operating point and webpage window one side it Between the first distance, by the distance for obtaining operating point to the window one side of webpage be used as calculate foundation rather than using with For the distance on DOM borders as the foundation calculated, it is larger and have the situation of horizontal scroll bar to be adapted to webpage transverse width, will not There is Wrong localization.In Fig. 6, the operating point 6A is the correspondence cursor position of mouse on a display screen, the position and webpage The distance between window one side be the first distance 601, under normal circumstances can using on the left of the window of webpage as benchmark, i.e., First distance is the distance on the left of the cursor position and web page windows of mouse, and being represented in the present embodiment using event.clienX should First distance.And the triggering region 6B is included in the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Region.When actually judging, step S101 determines that the operating point is in triggering according to the current location information of the operating point Region can specifically include:If whether first distance and the difference of second distance are less than threshold value, it is determined that the operating point is worked as It is preceding to be in triggering region, wherein separator bar 6C of the second distance 602 between the adjacent Visible Cells Only of any two With the distance of the window one side of the webpage.After definite operating point enters triggering region, thus it is possible to vary the cursor shape of mouse State, for identifying in the triggering region for having had been introduced into and can having carried out pulling adjusting.
Since triggering region is only the region between two adjacent Visible Cells Onlies, in order to avoid being moved in operating point During the border of form, i.e., near the right margin of the Visible Cells Only of the left margin and rightmost side of the Visible Cells Only of the leftmost side When, occur cursor shape change situation, can first to a certain cell whether be in form the Visible Cells Only of the leftmost side or The Visible Cells Only of the person rightmost side is judged.In practical applications, the jQuery that may be employed prevAll (': Visible') and nextAll (':Visible') Visible Cells Only is traveled through, judges whether a certain Visible Cells Only is table The Visible Cells Only of the leftmost side or the Visible Cells Only of the rightmost side in lattice.If a certain Visible Cells Only is not the leftmost side in form Visible Cells Only or the rightmost side Visible Cells Only, then the left margin and right margin of the cell can be used as separate Line determines to determine triggering region, and col width is adjusted so as to fulfill pulling.
Such as the 3rd Visible Cells Only th on the left of form, the left margin of the cell and the window left side of webpage Distance can be obtained by way of th.get (0) .getBoundingClientRect () .left of jQuery, use Which can be adapted for that page transverse width is larger, there is scene when laterally rolling.Since the 3rd on the left of form can The left margin for seeing cell is the separator bar between second Visible Cells Only, and right margin is and the 4th visible element Separator bar between lattice.If the distance value is defined as left in the present embodiment, the width of the 3rd Visible Cells Only is defined as Th.width (), then the position of the separator bar between second Visible Cells Only and the 3rd Visible Cells Only can be by Left is determined, and the position of the separator bar between the 3rd Visible Cells Only and the 4th Visible Cells Only can be by th.width ()+left is determined.It as a result, can be true by comparing the first distance event.clienX and left or th.width ()+left Determine whether mouse enters trigger position.In the present embodiment, as | event.clientX-left | < 3px or | th.width ()+left-event.clientX | in the case of < 3px, that is, mouse is moved to the border of the 3rd Visible Cells Only th During the position of neighbouring 3 pixels, that is, enter the triggering region that dragging adjusts col width.At this point it is possible to using th.css (' cursor':' e-resize'}) change the cursor shape of mouse, enter triggering region for identifying.
After mouse enters triggering region, mouse is pressed in the triggering region, that is, represents to start in the trigger region It is performed in domain and adjusts trigger action, start to carry out the calculating of form col width information according to the subsequent dragging of mouse at this time.Correspondingly, Operation is terminated to represent to adjust with lift action of the mouse after pressing, is stopped at this time according to the subsequent mobile progress form of mouse The calculating of col width information.In practical applications, one can be changed after the operation for pressing mouse is got for identifying whether Global variable onDragStatus in the process of dragging, when the value of onDragStatus is set to true, represents to be currently at Dragging state can carry out the real-time calculating of form col width information according to the subsequent dragging of mouse at this time.
Further, step S103 forms according to the col width presentation of information of the form, specifically include:It is getting When the adjusting that the operating point performs in the triggering region terminates operation, believed according to the col width of the form at current time Breath shows the form;Or the form according to the col width presentation of information of the form at each moment, until getting institute It states the adjusting that operating point performs in the triggering region and terminates operation.In practical applications, according to the results show of calculating institute When stating form, two ways may be employed:1st, according to being calculated in real time as a result, the col width information being calculated using each moment Show the form, i.e. the col width of form can in real time change with the dragging position after mouse down, until mouse is lifted It rises.For example, every 50ms can be set to carry out the calculating of a col width information according to the current location of mouse, complete once to calculate The update that form is shown is carried out immediately afterwards, until mouse-up.2nd, in mouse-up, the col width information for obtaining current time is shown Show the form, i.e. the col width of form only changes in mouse-up.For example, the calculating of col width information equally could be provided as often 50ms is carried out once according to the current location of mouse, but the result of calculation of col width information is obtained only in mouse-up, is gone forward side by side The update that row form is shown.In practical applications, the mode of update display, the first side can be set according to concrete application scene Formula display effect more dynamic, directly perceived, but for the computational load higher of equipment, and calculating of the second way for equipment Load it is relatively low, but display effect be less than first way.
Preferably, after the adjusting trigger action that the operating point performs in the triggering region is got, according to The current location information of the current location information of the operating point and the correlation unit lattice obtains the col width information of form, specifically Including step as shown in Figure 2:
Step S201, according to the current location information of the operating point and the current location information meter of the correlation unit lattice The col width value of correlation unit lattice is calculated, and obtains the col width value with remaining element lattice in a line.Here, the correlation unit lattice include Two adjacent Visible Cells Onlies of the triggering region both sides, such as the triggering region that the adjusting of this col width is related to are left for form The region of 3 pixels in separator bar both sides between the Visible Cells Only of side second and the 3rd Visible Cells Only, then related single First lattice are second Visible Cells Only and the 3rd Visible Cells Only.As long as due to changing one in certain row in form Cell width may result in the variation of the column width, and the width of all cells of the row can change therewith, because Cell during this only needs for certain a line in processing is handled, and can automatically be adapted to entire form.
When col width is adjusted, the col width value of correlation unit lattice changes with the movement of the separator bar between correlation unit lattice, And the position of separator bar is the position updated when showing form where mouse, therefore, according to the current location of the operating point The current location information of information and the correlation unit lattice calculates the col width value of correlation unit lattice, specifically includes:According to the behaviour The current location information of work point determines the current location information of the separator bar of the correlation unit lattice;According to working as the separator bar The current location information of front position information and the correlation unit lattice calculates the col width value of correlation unit lattice.
In practical applications, it can first determine reference cell lattice as subsequently calculating in two correlation unit lattice Foundation, in order to subsequent calculating.For example, with can be according to event.clientX-left<Th.width ()/2 judge base Quasi- cell determines that the cursor position of mouse and the left border of the 3rd Visible Cells Only or right side boundary are closer, If event.clientX-left<Th.width ()/2 are set up, then illustrate the left border of the 3rd Visible Cells Only of distance It is relatively near, it at this time can be using the previous cell (second Visible Cells Only i.e. on the left of form) for not being hidden state as meter The reference cell lattice of calculation.It is of course also possible to directly set cell on the basis of the Visible Cells Only on the left of triggering region.
The reference cell lattice are denoted as currTh, the first Visible Cells Only on the right side of the reference cell lattice is denoted as NextTh, such as the modes of while cycles may be employed, the Visible Cells Only on the right side of currTh is scanned for, the searched One Visible Cells Only is nextTh.Example is connected, second Visible Cells Only is currTh on the left of form, and width is ThisThWidth, and the 3rd Visible Cells Only is nextTh on the left of form, width nextThWidth, and calculate The sum of the width of two cells twoTdWidth.If individually change the col width of a certain cell, then form can be caused whole The variation of width destroys whole layout, therefore the col width by changing two correlation unit lattice simultaneously, when reference cell lattice When the col width of currTh is reduced, the corresponding col width for increasing nextTh, to ensure that the overall width of form is constant so that col width adjusts The integral layout of form will not be destroyed.
Then the position of reference cell lattice currTh is obtained, similar with aforementioned manner, which equally may be employed benchmark The left border of cell and the distance in the left side of web page windows represent, are denoted as thisThleft, the current location of mouse Event.clientX, and the thus alternate position spike currThWidth of the position of calculating benchmark cell and mouse current location.It is logical The position that crossing the value of currThWidth-thisThWidth can determine that mouse is currently located be in currTh or NextTh, if currThWidth-thisThWidth > 0, then it represents that mouse is in nextTh, currTh after update form Col width becomes larger;If currThWidth-thisThWidth < 0, then it represents that mouse is in currTh, updates currTh after form Col width become smaller.At this point, the value that the col width value of reference cell lattice currTh is currThWidth in correlation unit lattice, and The col width value of nextTh is the value of twoTdWidth-currThWidth.And remaining is the same as the col width value of remaining element lattice in a line It will not change before and after dragging, directly acquire its original col width value.
Step S202, using the col width value of the correlation unit lattice and with remaining element lattice in a line col width value as described in The col width information of form.For the accuracy in data transfer, can be protected by the form for the array for carrying index value Deposit the col width information of each cell.Specifically, by the col width value of the correlation unit lattice and with remaining element in a line Col width information of the col width value of lattice as the form, including:Obtain the correlation unit lattice and with remaining element lattice in a line Index value, the array for preserving the col width information is established according to index value, and using the col width value as corresponding in array The value of array element.Update show form when, the array can be directly acquired, further according to each cell index value by counting Its corresponding col width value is extracted in group.
Due to real-time computation sheet col width information when, the col width value of acquisition is concrete numerical value, such as acquisition is each The col width value of cell is respectively 100 pixels, 150 pixels etc., and step 103 is in the col width presentation of information according to the form During the form, shown according to concrete numerical value.Therefore, when the size adjustment of web page windows, form can only fit Webpage fixed width is answered to be laid out, it is impossible to change therewith with the adjustment of web page windows, webpage elasticity layout can not be adapted to.For solution The certainly above problem, the embodiment of the present application provide a kind of preferred embodiment, in the col width presentation of information according to the form After the form, further include:The col width information of the form is converted to often by the col width value of each cell in same a line The col width value of a cell accounts for the percentage of form overall width.At this point, the col width information preserved in array is each cell Col width value accounts for the percentage of form overall width, and when the size adjustment of web page windows, the col width of form can be according to web page windows Variation zoom in and out in proportion, enable adaptation to elastic layout.
Further, before col width adjusting is carried out, col width information can also be preserved in the form of percentage, to adapt to Web page windows variation before col width adjustment.Specifically, the behaviour is being determined according to the current location information of the operating point Make point before triggering region, further include:It obtains with the col width value of each cell in a line in the form, and by described in Col width value with each cell in a line is converted to the col width value of each cell in same a line and accounts for the percentage of form overall width Than.Since the conversion for carrying out percents needs to occupy certain computing resource, convert generally according to the operation The current location information of point determines that the operating point is shown before triggering region and in the col width information according to the form Show that the form carries out afterwards, computing resource is occupied simultaneously to avoid real-time calculating process when being adjusted with col width, when causing this The calculation amount of section is excessive, influences to pull the effect adjusted.
In the present embodiment, obtain in the form with the col width value of each cell in a line, specifically include:If the table Father's attribute of an element of lattice or the form is hiding, then is arranged to show by the attribute, obtains same a line in the form In each cell col width value, then the attribute is arranged to hiding.When obtaining col width value, since hiding element is nothing Method obtains its col width value, therefore firstly the need of whether form is judged in hidden state, if form is hiding, judgement is Itself is hidden or his father's element is hidden.It can be cycled using while and be scanned for father's element on upper strata herein, until looking into To not being hiding father's element.One of top layer hiding father's element is arranged to show, form can be got at this time In each cell col width value.After the conversion of Percent Complete form, the hiding element of display can will be arranged to, again It is arranged to hiding.
In addition, under some application scenarios, larger, gauge outfit (the i.e. table of height may be excessively caused due to the line number of form The first row of lattice) the often description to each row content.Therefore carried out in the content of the scroll bar operation form by longitudinal direction , it is necessary to which gauge outfit is allowed to fix when longitudinal direction rolls so that user remains able to see the description to each row content in rolling process. Since form is in itself without the function of fixed gauge outfit, another can be only had to the form of a line when realizing as former form Fixation gauge outfit, the position of the first row of former form is located in, so as to form the fixed effect of gauge outfit.Due to the fixation table Head and former form are substantially two forms, thus when showing form according to the new col width information update being calculated, it is necessary to Depth clone is carried out to fixed gauge outfit, specifically in step s 103, according to form described in the col width presentation of information of the form, Including:If there is fixed gauge outfit, the col width information of the form is copied as to the col width information of the fixed gauge outfit, according to described Form described in the col width presentation of information of form, while fix gauge outfit according to the col width presentation of information of the fixed gauge outfit.By This can ensure that former form and fixed gauge outfit are intuitively being shown as identical col width, ensure the uniformity in visual effect.Into One step, since two ways may be employed in the former form of display:1st, according to calculating in real time as a result, being counted using each moment Form described in obtained col width presentation of information.2nd, in mouse-up, table described in the col width presentation of information at current time is obtained Lattice.Similarly, the fixed gauge outfit can also carry out real-time update and shows or only once updated in a similar way Display.
Fig. 3 shows a kind of equipment for adjusting form col width provided by the embodiments of the present application, and first device 310, second fills Put 320 and 3rd device 330.Specifically, the first device 310 is used to be determined according to the current location information of the operating point The operating point is in triggering region;The second device 320 is used to get the operating point in the triggering region After the adjusting trigger action of execution, according to the current location of the current location information of the operating point and the correlation unit lattice The col width information of acquisition of information form;The 3rd device 330 is used for the form according to the col width presentation of information of the form.
Here, the operating point includes but not limited to the touch location of user on the touchscreen;Or operated by user The correspondence cursor position of the interactive devices such as mouse, trace ball or Trackpad on a display screen.Technical solution root in the present embodiment Determine that the operating point is in triggering region according to the current location information of operating point, only when operating point enters triggering region The regulating calculation of col width is carried out, the variation of original DOM structure will not be caused, so intrusive mood is than relatively low, it will not be with other effects In the plug-in unit conflict of form, so adaptability is relatively good.
Here, it will be appreciated by those skilled in the art that the equipment can include but is not limited to user equipment, the network equipment Or user equipment is integrated formed equipment by network with the network equipment.The user equipment includes but not limited to personal meter The realizations such as calculation machine, touch control terminal;The network equipment includes but not limited to such as network host, single network server, multiple nets The realizations such as network server set or set of computers based on cloud computing.Here, cloud is by being based on cloud computing (Cloud Computing) A large amount of hosts or network server form, wherein, cloud computing is one kind of Distributed Calculation, by the calculating of a group loose couplings One virtual machine of machine collection composition.
In practical applications, the current location information of the operating point include the operating point and webpage window one side it Between the first distance, by the distance for obtaining operating point to the window one side of webpage be used as calculate foundation rather than using with For the distance on DOM borders as the foundation calculated, it is larger and have the situation of horizontal scroll bar to be adapted to webpage transverse width, will not There is Wrong localization.In Fig. 6, the operating point 6A is the correspondence cursor position of mouse on a display screen, the position and webpage The distance between window one side be the first distance 601, under normal circumstances can using on the left of the window of webpage as benchmark, i.e., First distance is the distance on the left of the cursor position and web page windows of mouse, and being represented in the present embodiment using event.clienX should First distance.And the triggering region 6B is included in the separator bar both sides predetermined width between two adjacent Visible Cells Onlies Region.When actually judging, the first device 310 is specifically used for:If whether first distance and the difference of second distance are small In threshold value, it is determined that the operating point is currently in triggering region, wherein the second distance 602 is adjacent for any two Separator bar 6C and the distance of the window one side of the webpage between Visible Cells Only.When definite operating point enters triggering region Afterwards, thus it is possible to vary the cursor form of mouse, for identifying in the triggering region for having had been introduced into and can having carried out pulling adjusting.
Since triggering region is only the region between two adjacent Visible Cells Onlies, in order to avoid being moved in operating point During the border of form, i.e., near the right margin of the Visible Cells Only of the left margin and rightmost side of the Visible Cells Only of the leftmost side When, occur cursor shape change situation, can first to a certain cell whether be in form the Visible Cells Only of the leftmost side or The Visible Cells Only of the person rightmost side is judged.In practical applications, the jQuery that may be employed prevAll (': Visible') and nextAll (':Visible') Visible Cells Only is traveled through, judges whether a certain Visible Cells Only is table The Visible Cells Only of the leftmost side or the Visible Cells Only of the rightmost side in lattice.If a certain Visible Cells Only is not the leftmost side in form Visible Cells Only or the rightmost side Visible Cells Only, then the left margin and right margin of the cell can be used as separate Line determines to determine triggering region, and col width is adjusted so as to fulfill pulling.
Such as the 3rd Visible Cells Only th on the left of form, the left margin of the cell and the window left side of webpage Distance can be obtained by way of th.get (0) .getBoundingClientRect () .left of jQuery, use Which can be adapted for that page transverse width is larger, there is scene when laterally rolling.Since the 3rd on the left of form can The left margin for seeing cell is the separator bar between second Visible Cells Only, and right margin is and the 4th visible element Separator bar between lattice.If the distance value is defined as left in the present embodiment, the width of the 3rd Visible Cells Only is defined as Th.width (), then the position of the separator bar between second Visible Cells Only and the 3rd Visible Cells Only can be by Left is determined, and the position of the separator bar between the 3rd Visible Cells Only and the 4th Visible Cells Only can be by th.width ()+left is determined.It as a result, can be true by comparing the first distance event.clienX and left or th.width ()+left Determine whether mouse enters trigger position.In the present embodiment, as | event.clientX-left | < 3px or | th.width ()+left-event.clientX | in the case of < 3px, that is, mouse is moved to the border of the 3rd Visible Cells Only th During the position of neighbouring 3 pixels, that is, enter the triggering region that dragging adjusts col width.At this point it is possible to using th.css (' cursor':' e-resize'}) change the cursor shape of mouse, enter triggering region for identifying.
After mouse enters triggering region, mouse is pressed in the triggering region, that is, represents to start in the trigger region It is performed in domain and adjusts trigger action, start to carry out the calculating of form col width information according to the subsequent dragging of mouse at this time.Correspondingly, Operation is terminated to represent to adjust with lift action of the mouse after pressing, is stopped at this time according to the subsequent mobile progress form of mouse The calculating of col width information.In practical applications, one can be changed after the operation for pressing mouse is got for identifying whether Global variable onDragStatus in the process of dragging, when the value of onDragStatus is set to true, represents to be currently at Dragging state can carry out the real-time calculating of form col width information according to the subsequent dragging of mouse at this time.
Further, the 3rd device 330 is specifically used for:It is held getting the operating point in described trigger in region When capable adjusting terminates operation, according to form described in the col width presentation of information of the form at current time;Or according to each Form described in the col width presentation of information of the form at moment performs until getting the operating point in the triggering region Adjusting terminate operation.In practical applications, according to the results show of calculating during form, two ways may be employed:1、 According to calculating in real time as a result, the col width energy of form, i.e. form described in the col width presentation of information being calculated using each moment Enough as the dragging position after mouse down changes in real time, until mouse-up.For example, every 50ms can be set according to mouse Target current location carries out the calculating of a col width information, carries out the update that form is shown immediately after completing once to calculate, directly To mouse-up.2nd, in mouse-up, form described in the col width presentation of information at current time is obtained, i.e. the col width of form only exists Change during mouse-up.It is carried out for example, the calculating of col width information equally could be provided as every 50ms according to the current location of mouse Once, but the result of calculation of col width information is obtained only in mouse-up, and carries out the update that form is shown.In practical application In, the mode of update display can be set according to concrete application scene, first way display effect more dynamic, directly perceived, but It is the computational load higher for equipment, and the second way is relatively low for the computational load of equipment, but display effect is less than First way.
Preferably, the concrete structure of the second device 320 is as shown in figure 4, including the 2nd 1 module 321 and the two or two mould Block 322.Specifically, the 2nd 1 module 321 is used to get the operating point in the tune for triggering and performing in region After saving trigger action, calculated according to the current location information of the current location information of the operating point and the correlation unit lattice The col width value of correlation unit lattice, and obtain the col width value with remaining element lattice in a line.Here, the correlation unit lattice include institute Two adjacent Visible Cells Onlies of triggering region both sides, such as the triggering region that the adjusting of this col width is related to are stated as on the left of form The region of 3 pixels in separator bar both sides between second Visible Cells Only and the 3rd Visible Cells Only, then correlation unit Lattice are second Visible Cells Only and the 3rd Visible Cells Only.As long as due to changing a list in certain row in form First lattice width, may result in the variation of the column width, and the width of all cells of the row can change therewith, therefore Cell in only needing for certain a line in processing is handled, and can automatically be adapted to entire form.
When col width is adjusted, the col width value of correlation unit lattice changes with the movement of the separator bar between correlation unit lattice, And the position of separator bar is the position updated when showing form where mouse, therefore, the 2nd 1 module 321 is described in When the current location information of the current location information of operating point and the correlation unit lattice calculates the col width value of correlation unit lattice, use In the current location information for the separator bar that the correlation unit lattice are determined according to the current location information of the operating point, Yi Jigen The col width of correlation unit lattice is calculated according to the current location information of the separator bar and the current location information of the correlation unit lattice Value.
In practical applications, it can first determine reference cell lattice as subsequently calculating in two correlation unit lattice Foundation, in order to subsequent calculating.For example, with can be according to event.clientX-left<Th.width ()/2 judge base Quasi- cell determines that the cursor position of mouse and the left border of the 3rd Visible Cells Only or right side boundary are closer, If event.clientX-left<Th.width ()/2 are set up, then illustrate the left border of the 3rd Visible Cells Only of distance It is relatively near, it at this time can be using the previous cell (second Visible Cells Only i.e. on the left of form) for not being hidden state as meter The reference cell lattice of calculation.It is of course also possible to directly set cell on the basis of the Visible Cells Only on the left of triggering region.
The reference cell lattice are denoted as currTh, the first Visible Cells Only on the right side of the reference cell lattice is denoted as NextTh, such as the modes of while cycles may be employed, the Visible Cells Only on the right side of currTh is scanned for, the searched One Visible Cells Only is nextTh.Example is connected, second Visible Cells Only is currTh on the left of form, and width is ThisThWidth, and the 3rd Visible Cells Only is nextTh on the left of form, width nextThWidth, and calculate The sum of the width of two cells twoTdWidth.If individually change the col width of a certain cell, then form can be caused whole The variation of width destroys whole layout, therefore the col width by changing two correlation unit lattice simultaneously, when reference cell lattice When the col width of currTh is reduced, the corresponding col width for increasing nextTh, to ensure that the overall width of form is constant so that col width adjusts The integral layout of form will not be destroyed.
Then the position of reference cell lattice currTh is obtained, similar with aforementioned manner, which equally may be employed benchmark The left border of cell and the distance in the left side of web page windows represent, are denoted as thisThleft, the current location of mouse Event.clientX, and the thus alternate position spike currThWidth of the position of calculating benchmark cell and mouse current location.It is logical The position that crossing the value of currThWidth-thisThWidth can determine that mouse is currently located be in currTh or NextTh, if currThWidth-thisThWidth > 0, then it represents that mouse is in nextTh, currTh after update form Col width becomes larger;If currThWidth-thisThWidth < 0, then it represents that mouse is in currTh, updates currTh after form Col width become smaller.At this point, the value that the col width value of reference cell lattice currTh is currThWidth in correlation unit lattice, and The col width value of nextTh is the value of twoTdWidth-currThWidth.And remaining is the same as the col width value of remaining element lattice in a line It will not change before and after dragging, directly acquire its original col width value.
Two or two module 322 is used for the col width value of the correlation unit lattice and the row with remaining element lattice in a line Col width information of the width values as the form.It, can be by carrying index value for the accuracy in data transfer The form of array preserves the col width information of each cell.Specifically, the two or two module 322 is used to obtain the phase Cell and the index value with remaining element lattice in a line are closed, the array for preserving the col width information is established according to index value, and Using the col width value as the value of corresponding array element in array.When update shows form, the array can be directly acquired, Further according to each cell index value by extracting its corresponding col width value in array.
Due to real-time computation sheet col width information when, the col width value of acquisition is concrete numerical value, such as acquisition is each The col width value of cell is respectively 100 pixels, 150 pixels etc., and 3rd device 330 is in the col width information according to the form When showing the form, shown according to concrete numerical value.Therefore, when the size adjustment of web page windows, form is only Adapt to webpage fixed width layout, it is impossible to change therewith with the adjustment of web page windows, webpage elasticity layout can not be adapted to. To solve the above problems, the embodiment of the present application provides a kind of preferred equipment for adjusting form col width, the structure of the equipment is such as Shown in Fig. 5, in addition to first device 310 shown in Fig. 3, second device 320 and 3rd device 330, the 4th device 340 is further included. Specifically, the 4th device 340 is used for after form described in the col width presentation of information according to the form, by the form Col width information the col width value of each cell be converted to by the col width value of each cell in same a line account for form overall width Percentage.At this point, the col width information preserved in array accounts for the percentage of form overall width for the col width value of each cell, work as net During the size adjustment of page window, the col width of form can in proportion be zoomed in and out according to the variation of web page windows, so as to suitable It should elasticity layout.Here, it will be appreciated by those skilled in the art that the first device 310, second device 320 and 3rd device 330 is identical or essentially identical with the content of corresponding intrument in Fig. 3 embodiments respectively, and for simplicity, therefore details are not described herein, and It is incorporated herein by reference.
Further, before col width adjusting is carried out, col width information can also be preserved in the form of percentage, to adapt to Web page windows variation before col width adjustment.Specifically, the equipment of the adjusting form col width in the embodiment of the present application can be with Including the 5th device (not shown), the 5th device is used to determine the operation according to the current location information of the operating point Point is obtained in the form before triggering region with the col width value of each cell in a line, and will be in described same a line The col width value that the col width value of each cell is converted to each cell in same a line accounts for the percentage of form overall width.Due into The conversion of row percents needs to occupy certain computing resource, therefore converts generally in the present bit according to the operating point Confidence breath determines that the operating point is in before triggering region and in form described in the col width presentation of information according to the form It carries out afterwards, occupies computing resource simultaneously to avoid real-time calculating process when being adjusted with col width, cause the calculation amount of the period It is excessive, it influences to pull the effect adjusted.
Wherein, the 5th device is specific to use in the col width value of each cell in obtaining the form with a line When father's attribute of an element in the form or the form is hides, then the attribute is arranged to show, described in acquisition With the col width value of each cell in a line in form, then the attribute is arranged to hiding.When obtaining col width value, due to hidden The element of Tibetan is can not to obtain its col width value, therefore firstly the need of whether form is judged in hidden state, if form is hidden It hides, then judges it is that itself hiding or his father's element is hidden.Can use herein while cycle father's element to upper strata into Row search, until it is not hiding father's element to find.One of top layer hiding father's element is arranged to show, at this time can To get the col width value of each cell in form.After the conversion of Percent Complete form, display can will be arranged to Element is hidden, is re-set as hiding.
In addition, under some application scenarios, larger, gauge outfit (the i.e. table of height may be excessively caused due to the line number of form The first row of lattice) the often description to each row content.Therefore carried out in the content of the scroll bar operation form by longitudinal direction , it is necessary to which gauge outfit is allowed to fix when longitudinal direction rolls so that user remains able to see the description to each row content in rolling process. Since form is in itself without the function of fixed gauge outfit, another can be only had to the form of a line when realizing as former form Fixation gauge outfit, the position of the first row of former form is located in, so as to form the fixed effect of gauge outfit.Due to the fixation table Head and former form are substantially two forms, thus when showing form according to the new col width information update being calculated, it is necessary to Depth clone is carried out to fixed gauge outfit, specifically the 3rd device 330 is used for when there is fixed gauge outfit, by the form Col width information copies as the col width information of the fixed gauge outfit, according to form described in the col width presentation of information of the form, simultaneously Gauge outfit is fixed according to the col width presentation of information of the fixed gauge outfit.It is possible thereby to ensure former form and fixed gauge outfit directly perceived On be shown as identical col width, ensure the uniformity in visual effect.Further, due to may be employed in the former form of display Two ways:1st, according to calculating in real time as a result, form described in the col width presentation of information being calculated using each moment.2nd, exist During mouse-up, form described in the col width presentation of information at current time is obtained.Similarly, the fixed gauge outfit can also use class As mode carry out real-time update and show or only once updated display.
It is touched in conclusion the technical solution of the application determines that the operating point is according to the current location information of operating point Region is sent out, the regulating calculation of col width is only carried out when operating point enters triggering region, the change of original DOM structure will not be caused Change, so intrusive mood than relatively low, will not conflict, so adaptability is relatively good with other plug-in units for acting on form.
Meanwhile when separator bar both sides have hiding cell, it is used as col width tune by obtaining adjacent Visible Cells Only The foundation calculated is saved, the cell for avoiding hidden state exchanges the influence that nodule fruit brings, and is arrived by obtaining operating point The distance of the window one side of webpage, can as the foundation calculated rather than using foundation of the distance with DOM borders as calculating It is larger and have the situation of horizontal scroll bar to adapt to webpage transverse width, be not in Wrong localization.
In addition, when carrying out col width regulating calculation, using considering two adjacent Visible Cells Onlies simultaneously, and calculating Col width is represented in the form of percentage after finishing, so when widening a row, form will not integrally broaden, and will not break at this time Bad original layout type, and it is adapted to elastic layout.And when there is fixed gauge outfit, it can be by the related col width of form Adjustment is associated with fixed gauge outfit so that fixed gauge outfit can also be adjusted therewith, so as to effectively solve the feelings for having fixed gauge outfit Under condition, col width adjust the problem of.
It should be noted that the application can be carried out in the assembly of software and/or software and hardware, for example, can adopt With application-specific integrated circuit (ASIC), general purpose computer or any other realized similar to hardware device.In one embodiment In, the software program of the application can perform to realize steps described above or function by processor.Similarly, the application Software program can be stored in computer readable recording medium storing program for performing (including relevant data structure), for example, RAM memory, Magnetic or optical driver or floppy disc and similar devices.In addition, hardware can be used to realize in some steps or function of the application, example Such as, as the circuit for coordinating to perform each step or function with processor.
In addition, the part of the application can be applied to computer program product, such as computer program instructions, when its quilt When computer performs, by the operation of the computer, it can call or provide according to the present processes and/or technical solution. And the program instruction of the present processes is called, be possibly stored in fixed or moveable recording medium and/or is passed through Broadcast or the data flow in other signal bearing medias and be transmitted and/or be stored according to described program instruction operation In the working storage of computer equipment.Here, including a device according to one embodiment of the application, which includes using Memory in storage computer program instructions and processor for executing program instructions, wherein, when the computer program refers to When order is performed by the processor, method and/or skill of the device operation based on foregoing multiple embodiments according to the application are triggered Art scheme.
It is obvious to a person skilled in the art that the application is not limited to the details of above-mentioned exemplary embodiment, Er Qie In the case of without departing substantially from spirit herein or essential characteristic, the application can be realized in other specific forms.Therefore, no matter From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and scope of the present application is by appended power Profit requirement rather than above description limit, it is intended that all by what is fallen within the meaning and scope of the equivalent requirements of the claims Variation is included in the application.Any reference numeral in claim should not be considered as to the involved claim of limitation.This Outside, it is clear that one word of " comprising " is not excluded for other units or step, and odd number is not excluded for plural number.That is stated in device claim is multiple Unit or device can also be realized by a unit or device by software or hardware.The first, the second grade words are used for table Show title, and do not represent any particular order.

Claims (18)

1. a kind of method for adjusting form col width, wherein, this method includes:
If the first distance and the difference of second distance are less than threshold value, it is determined that operating point is currently in triggering region, wherein, it is described The distance of the window one side of separator bar and webpage of the second distance between the adjacent Visible Cells Only of any two, the operation The current location information of point includes the first distance between the operating point and the window one side of webpage, and the triggering region includes The region in the predetermined width of separator bar both sides between two adjacent Visible Cells Onlies;
After the adjusting trigger action that the operating point performs in the triggering region is got, according to the operating point The current location information of current location information and correlation unit lattice obtains the col width information of form;
According to form described in the col width presentation of information of the form.
2. according to the method described in claim 1, wherein, according to form described in the col width presentation of information of the form, including:
When getting the adjusting termination operation that the operating point performs in the triggering region, according to current time Form described in the col width presentation of information of form;Or
According to form described in the col width presentation of information of the form at each moment, touched until getting the operating point described It sends out the adjusting performed in region and terminates operation.
3. according to the method described in claim 1, wherein, the triggering region is included between two adjacent Visible Cells Onlies Region in the predetermined width of separator bar both sides, the correlation unit lattice include adjacent visible of the triggering two of region both sides Cell;
The col width of form is obtained according to the current location information of the current location information of the operating point and the correlation unit lattice Information, including:
Correlation unit lattice are calculated according to the current location information of the current location information of the operating point and the correlation unit lattice Col width value, and obtain with remaining element lattice in a line col width value;
Believe using the col width value of the correlation unit lattice and with the col width value of remaining element lattice in a line as the col width of the form Breath.
4. according to the method described in claim 3, wherein, according to the current location information of the operating point and the correlation unit The current location information of lattice calculates the col width value of correlation unit lattice, including:
The current location information of the separator bar of the correlation unit lattice is determined according to the current location information of the operating point;
Correlation unit lattice are calculated according to the current location information of the current location information of the separator bar and the correlation unit lattice Col width value.
5. according to the method described in claim 3, wherein, by the col width value of the correlation unit lattice and with remaining element in a line Col width information of the col width value of lattice as the form, including:
The correlation unit lattice and the index value with remaining element lattice in a line are obtained, is established according to index value and preserves the col width The array of information, and using the col width value as the value of corresponding array element in array.
6. the method according to any one of claims 1 to 5, wherein, in the col width presentation of information institute according to the form After stating form, further include:
The col width information of the form is converted to the col width value of each cell by the col width value of each cell in same a line Account for the percentage of form overall width.
7. the method according to any one of claims 1 to 5, wherein, according to the col width presentation of information of the form Form, including:
If there is fixed gauge outfit, the col width information of the form is copied as to the col width information of the fixed gauge outfit, according to described Form described in the col width presentation of information of form, while fix gauge outfit according to the col width presentation of information of the fixed gauge outfit.
8. the method according to any one of claims 1 to 5, wherein, in the current location information according to the operating point It determines that the operating point is in before triggering region, further includes:
It obtains with the col width value of each cell in a line in the form, and by the col width of each cell in described same a line The col width value that value is converted to each cell in same a line accounts for the percentage of form overall width.
9. according to the method described in claim 8, wherein, obtain in the form with the col width value of each cell in a line, Including:
If father's attribute of an element of the form or the form is hiding, the attribute is arranged to show, described in acquisition With the col width value of each cell in a line in form, then the attribute is arranged to hiding.
10. a kind of equipment for adjusting form col width, wherein, which includes:
First device, if being less than threshold value for the first distance and the difference of second distance, operating point is currently in triggering region, Wherein, the window one side of separator bar and webpage of the second distance between the adjacent Visible Cells Only of any two away from From the current location information of the operating point includes the first distance between the operating point and the window one side of webpage, described Triggering region includes the region in the separator bar both sides predetermined width between two adjacent Visible Cells Onlies;
Second device, for getting the operating point in the triggering region after the adjusting trigger action that performs, root The col width information of form is obtained according to the current location information of the operating point and the current location information of correlation unit lattice;
3rd device, for form described in the col width presentation of information according to the form.
11. equipment according to claim 10, wherein, the 3rd device, for getting the operating point in institute When stating the adjusting termination operation performed in triggering region, according to table described in the col width presentation of information of the form at current time Lattice;Or the form according to the col width presentation of information of the form at each moment, until getting the operating point in institute It states the adjusting performed in triggering region and terminates operation.
12. equipment according to claim 10, wherein, the triggering region is included between two adjacent Visible Cells Onlies Separator bar both sides predetermined width in region, the correlation unit lattice include the triggering two of region both sides it is adjacent can See cell;
The second device, including:
2nd 1 module, for getting the operating point in the triggering region after the adjusting trigger action that performs, The row of correlation unit lattice are calculated according to the current location information of the current location information of the operating point and the correlation unit lattice Width values, and obtain the col width value with remaining element lattice in a line;
Two or two module, for using the col width value of the correlation unit lattice and with remaining element lattice in a line col width value as institute State the col width information of form.
13. equipment according to claim 12, wherein, the 2nd 1 module is in the present bit confidence according to the operating point When the current location information of breath and the correlation unit lattice calculates the col width value of correlation unit lattice, for according to the operating point Current location information determines the current location information of the separator bar of the correlation unit lattice and according to the current of the separator bar The current location information of location information and the correlation unit lattice calculates the col width value of correlation unit lattice.
14. equipment according to claim 12, wherein, the two or two module, for obtain the correlation unit lattice and With the index value of remaining element lattice in a line, the array for preserving the col width information is established according to index value, and by the col width It is worth the value as corresponding array element in array.
15. the equipment according to any one of claim 10 to 14, wherein, which further includes:
4th device, for after form described in the col width presentation of information according to the form, the col width of the form to be believed The col width value that breath is converted to each cell by the col width value of each cell in same a line accounts for the percentage of form overall width.
16. the equipment according to any one of claim 11 to 14, wherein, the 3rd device, for there is fixation During gauge outfit, the col width information of the form is copied as to the col width information of the fixed gauge outfit, is believed according to the col width of the form Breath shows the form, while fixes gauge outfit according to the col width presentation of information of the fixed gauge outfit.
17. the equipment according to any one of claim 11 to 14, wherein, which further includes:
5th device, for according to the current location information of the operating point determine the operating point be in triggering region it Before, it obtains with the col width value of each cell in a line in the form, and by the col width of each cell in described same a line The col width value that value is converted to each cell in same a line accounts for the percentage of form overall width.
18. equipment according to claim 17, wherein, the 5th device in the form is obtained with a line in it is each During the col width value of cell, for father's attribute of an element of the form or the form for hide when, then by the attribute It is arranged to show, obtains with the col width value of each cell in a line in the form, then the attribute is arranged to hiding.
CN201510566228.1A 2015-09-08 2015-09-08 Adjust the method and apparatus of form col width Active CN105094622B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510566228.1A CN105094622B (en) 2015-09-08 2015-09-08 Adjust the method and apparatus of form col width

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510566228.1A CN105094622B (en) 2015-09-08 2015-09-08 Adjust the method and apparatus of form col width

Publications (2)

Publication Number Publication Date
CN105094622A CN105094622A (en) 2015-11-25
CN105094622B true CN105094622B (en) 2018-05-22

Family

ID=54575200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510566228.1A Active CN105094622B (en) 2015-09-08 2015-09-08 Adjust the method and apparatus of form col width

Country Status (1)

Country Link
CN (1) CN105094622B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886511B (en) * 2016-06-21 2020-03-31 阿里巴巴集团控股有限公司 Network table processing method and device
CN107515752A (en) * 2017-08-18 2017-12-26 深圳易嘉恩科技有限公司 Grid control for data assets basic platform visualized operation
CN107544952B (en) * 2017-08-28 2022-01-07 金蝶软件(中国)有限公司 Report generation method and device, storage medium and computer equipment
CN107704244A (en) * 2017-10-30 2018-02-16 郑州云海信息技术有限公司 A kind of method realized bookstrap table grid columns and pulled
CN109635263B (en) * 2018-11-22 2023-04-28 北京字节跳动网络技术有限公司 Column width fixed display method and device based on WEB ultra-wide table and electronic equipment
CN111259639B (en) * 2020-01-10 2023-09-08 海信视像科技股份有限公司 Self-adaptive adjustment method of table and display equipment
CN113221046B (en) * 2020-01-17 2023-07-25 大唐移动通信设备有限公司 Method and device for adjusting browser form column

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101065723A (en) * 2004-11-26 2007-10-31 菲利普·K·钦 Method of displaying data in a table
CN101140496A (en) * 2007-10-23 2008-03-12 深圳市迅雷网络技术有限公司 Method and device for regulating column frame
CN103473001A (en) * 2013-09-25 2013-12-25 珠海金山办公软件有限公司 Cell adjusting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5039903B2 (en) * 2008-02-18 2012-10-03 インターナショナル・ビジネス・マシーンズ・コーポレーション System, method and program for executing application

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101065723A (en) * 2004-11-26 2007-10-31 菲利普·K·钦 Method of displaying data in a table
CN101140496A (en) * 2007-10-23 2008-03-12 深圳市迅雷网络技术有限公司 Method and device for regulating column frame
CN103473001A (en) * 2013-09-25 2013-12-25 珠海金山办公软件有限公司 Cell adjusting method and device

Also Published As

Publication number Publication date
CN105094622A (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN105094622B (en) Adjust the method and apparatus of form col width
CN104809154B (en) The method and device recommended for information
JP6430020B2 (en) Web page loading method and system
US20180052943A1 (en) Systems and methods for controlling webpage pre-rendering
KR102047568B1 (en) Measuring web page rendering time
CN105260420B (en) A kind of method and apparatus for the offer target pages in mobile application
US10353721B2 (en) Systems and methods for guided live help
US20120311489A1 (en) Target Element Zoom
JP6646931B2 (en) Method and apparatus for providing recommendation information
US9761034B2 (en) Animation emulating live web page content resizing
US20130198641A1 (en) Predictive methods for presenting web content on mobile devices
CN102411614A (en) Display Of Image Search Results
CN106155644B (en) Webpage focal point control implementation method suitable for smart television browser
US11029835B2 (en) Systems and methods for delayed content overlay
CN103098001B (en) A kind of disposal route of user interface and electronic equipment
WO2019212728A1 (en) Displaying a subset of menu items based on a prediction of the next user-actions
EP3262497A1 (en) Contextual zoom
CN103019557B (en) Page switching method and device
WO2011123981A1 (en) Detection of boilerplate content
WO2014032589A1 (en) Window switching method and apparatus
WO2016177280A1 (en) Method and apparatus for recording and restoring click position in page
CN106886511B (en) Network table processing method and device
CN109240912A (en) A kind of performance estimating method and terminal of the web application based on big data analysis
JP2022512056A (en) Page processing methods, devices, electronic devices and computer readable storage media
CN105989166A (en) Waterfall flow type object display method, apparatus and system as well as electronic device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant