Summary of the invention
The application's technical matters to be solved is to provide a kind of picture element display packing and device, solve in prior art and pull in process, browser is in document object model tree, all being needed again to reflux by all elements that can be pulled after dragging object position, recalculate its position, and the process of playing up, thereby the load that causes calculating and play up is large, system resource takies seriously, CPU (Central Processing Unit, central processing unit) utilization rate is high, affects the problem of the normal operation of other programs of system.
In order to address the above problem, the application discloses picture element display packing in a kind of webpage, comprising:
The drag motions of intercepting the first picture element in page display area starts, and adds mask layer; Wherein said mask layer is added in page documents object model tree after last element position, and described mask layer brings to Front, and the region that described mask layer covers comprises the region that the page shows;
Create the second picture element corresponding with the first picture element being pulled at mask layer, described second picture element comprises the picture in the content-data of the first picture element;
Intercept the movement that pulls of second picture element, according to pulling the mobile position that described second picture element is set;
The drag motions of intercepting the first picture element in page display area finishes, and hides described mask layer, according to the 3rd picture element of drag motions end, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged;
In the region showing at the described page, only play up the first exchanged picture element and the 3rd picture element.
Preferably, the drag motions of intercepting the first picture element in page display area starts, and adds mask layer, and the step that creates the second picture element corresponding with the first picture element being pulled at mask layer comprises:
Listen to mouse drag motions and start, obtain the content-data in Cascading Style Sheet position data, document object model tree structured data and the document object model tree structure of the first picture element;
In described mask layer, create the second picture element corresponding with the first picture element according to described Cascading Style Sheet position data and document object model tree structured data;
Content-data in described document object model tree structure is set to described second picture element according to document object model tree version.
The step of preferably, adding described mask layer comprises:
In document object model tree corresponding to the page, after the position of last element, add mask layer structure in advance;
The overlay area that mask layer is set in layout architecture body corresponding to Cascading Style Sheet is the region that the described page shows.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
Add the div of corresponding mask layer at the trunk tail end of document object model tree.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
After the each placement of document object model tree respectively can pull last father div of the sub-div in element place, add the div of corresponding mask layer, and be top layer div by its setup of attribute.
Preferably, described in intercept the first picture element in page display area drag motions finish, hide described mask layer step and comprise:
Delete the second picture element creating in described mask layer.
Preferably, according to the 3rd picture element of drag motions end, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged and is comprised:
Listen to drag motions and finish, if while there is content-data in document object model tree structure corresponding to the 3rd picture element corresponding to region, obtain the content-data in the document object model tree structure that the 3rd picture element is corresponding;
Keep Cascading Style Sheet position and the document object model tree structure of the first picture element and the 3rd picture element constant, and the content-data in corresponding the first picture element document object model tree structure is exchanged with the content-data in the corresponding document object model tree structure of the 3rd picture element.
The drag motions of intercepting the first picture element in page display area preferably, starts step and comprises:
When listening to mouse and pressing, judge whether mouse belongs to effective coverage by lower area; If so, listen to mouse and whether start to move, if so, load described mask layer.
Preferably, further comprise:
Judge that drag motions end pulls mouse region whether in the preset range of the 3rd picture element region;
If so, determine that the picture element that described drag motions end pulls mouse region is the 3rd picture element.
Preferably, described mask layer is covered on the picture element building with absolute layout type;
And/or described mask layer is covered on the picture element building with streaming layout type.
Preferably, the picture element that described absolute layout type builds comprises the picture element of nine grids form and/or the picture element of 12 palace lattice.
Accordingly, the application discloses a kind of picture element display device, comprising:
Mask layer adds module, starts for the drag motions of intercepting page display area the first picture element, adds mask layer; Wherein said mask layer is added in page documents object model tree after last element position, and described mask layer brings to Front, and the region that described mask layer covers comprises the region that the page shows;
Second picture element creation module, for creating the second picture element corresponding with the first picture element being pulled at mask layer, described second picture element comprises the picture in the content-data of the first picture element;
Second picture element is modules dragged, for intercepting the movement that pulls of second picture element, according to pulling the mobile position that described second picture element is set;
Content processing module, finish for the drag motions of intercepting page display area the first picture element, hide described mask layer, according to the 3rd picture element of drag motions end, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged;
Play up display module, only play up the first exchanged picture element and the 3rd picture element for the region showing at the described page.
Preferably, described second picture element creation module comprises:
The first data acquisition submodule, starts for listening to mouse drag motions, obtains the content-data in Cascading Style Sheet position data, document object model tree structured data and the document object model tree structure of the first picture element;
First creates submodule, for creating the second picture element corresponding with the first picture element according to described Cascading Style Sheet position data and document object model tree structured data at described mask layer;
Assignment submodule, for being set to described second picture element by the content-data of described document object model tree structure according to document object model tree version.
The module of preferably, adding described mask layer comprises:
Document object model tree is added submodule, in document object model tree corresponding to the page, after the position of last element, adds mask layer structure in advance;
Style setting submodule is the region that the described page shows for the overlay area of mask layer is set at layout architecture body corresponding to Cascading Style Sheet.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
Add the div of corresponding mask layer at the trunk tail end of document object model tree.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
After the each placement of document object model tree respectively can pull last father div of the sub-div in element place, add the div of corresponding mask layer, and be top layer div by its setup of attribute.
Preferably, described content processing module comprises:
Delete submodule, the second picture element creating for deleting described mask layer.
Preferably, described content processing module comprises:
The 3rd picture element obtains submodule, being used for listening to drag motions finishes, if while there is content-data in document object model tree structure corresponding to the 3rd picture element corresponding to region, obtain the content-data in the document object model tree structure that the 3rd picture element is corresponding;
Replace submodule, for keeping Cascading Style Sheet position and the document object model tree structure of the first picture element and the 3rd picture element constant, and the content-data in corresponding the first picture element document object model tree structure is exchanged with the content-data in the corresponding document object model tree structure of the 3rd picture element.
Preferably, add module at described mask layer, described in intercept the first picture element in page display area drag motions comprise while starting:
Judge submodule, in the time listening to mouse and press, judge whether mouse belongs to effective coverage by lower area; If so, listen to mouse and whether start to move, if so, load described mask layer.
Preferably, further comprise::
Pull end region judge module, for judging that drag motions end pulls mouse region whether in the preset range of the 3rd picture element region;
If so, determine that the picture element that described drag motions end pulls mouse region is the 3rd picture element.
Preferably, described mask layer is covered on the picture element building with absolute layout type;
And/or described mask layer is covered on the picture element building with streaming layout type.
Preferably, the picture element that described absolute layout type builds comprises the picture element of nine grids form and/or the picture element of 12 palace lattice.
Compared with prior art, the application comprises following advantage:
The application, in the time that the drag motions that listens to mouse starts, activates interpolation and is covered in the whole mask layer that pulls region, then in mask layer, creates second picture element corresponding to the first picture element being pulled; The position of wherein said mask layer correspondence in document object model tree, after the each position in each element correspondence in document object model tree; So when mouse drag, it is the second picture element in the mask layer dragging, do not drag the first picture element of origin-location, the position of the first picture element like this does not change, according to the rule of playing up of browser, the position of the element in document object model tree after this element is also without re-starting calculating, and general as long as calculate the position of second picture element in mask layer, calculated amount reduces.In addition, dragging after end, just by the displaying contents of the first picture element, the content-data in the document object model tree structure that the first picture element is corresponding, as the 3rd picture element content, if there is displaying contents in the 3rd picture element, so also only need be using the displaying contents of the 3rd picture element as first, in this process, just its displaying contents that the 3rd picture element and the first picture element change, its position and structure all change, therefore, browser also without recalculate in document object model tree the first picture element or the 3rd picture element after the position of element, and during due to calculating element position, need to use in a large number page script and go to calculate, and the application is owing to there is no the element that recalculates position, goes to calculate so generally need not use page script.Again, after content replacement completion, while redrawing, only need to redraw the content of the first picture element and the 3rd picture element, without redraw in document object model tree the first picture element or the 3rd picture element after the content of element.
Therefore, the application has reduced the number of times refluxing, and needs the number of the element that recalculates position, thereby has also reduced the number of times redrawing, and has reduced system resource occupancy, has also reduced the utilization rate of CPU.
Embodiment
For the above-mentioned purpose, the feature and advantage that make the application can become apparent more, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
One of core concept of the application is: in document object model tree, after last element, add a mask layer structure; In the time listening to mouse and start drag motions, add mask layer, and in mask layer, copy a second picture element that the first picture element pulling with mouse is corresponding, so, pulling in process, what pull is the second picture element in mask layer, and the first picture element does not carry out the movement of any position; In the time listening to mouse and upspring, hide described mask layer, indication the 3rd picture element while upspringing according to mouse, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged, so can guarantee in the immovable situation in position of the first picture element and the 3rd picture element exchanging contents.In this process, what moved position is the second picture element in mask layer, and because mask layer structure is in document object model tree structure after last element position, after this second picture element, there is no that other elements need to re-start position calculation so, the second picture element in the just mask layer also refluxing.Meanwhile, only need to, by after the content-data exchange of element and the 3rd picture element, redraw and play up.
With reference to Fig. 1, show the schematic flow sheet of a kind of picture element display packing of the application, specifically can comprise:
Step 110, the drag motions of intercepting the first picture element in page display area starts, and adds mask layer; Wherein said mask layer is added in page documents object model tree after last element position, and described mask layer brings to Front, and the region that described mask layer covers comprises the region that the page shows;
In this application, can in document object model tree, be provided with in advance a mask layer, in the time that un-activation is added in hidden state.
The step that described mask layer is set comprises:
Steps A 1, in document object model tree corresponding to the page, after the position of last element, adds mask layer structure in advance.
In RIA, movably also corresponding relevant position in document object model tree of element, generally, each removable element is in the time being arranged by layout architecture body corresponding to Cascading Style Sheet, in browser window, there is certain region in it, such as existing with the pattern of a rectangle, user can be by the rectangle of this position of mouse drag to other positions.
After mask layer is arranged the position of last removable element in document object model tree by the application.With reference to Fig. 2, it shows the preferred mask layer of the application position exemplary plot in document object model tree structure corresponding to HTML.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
Steps A 11, adds the div of corresponding mask layer at the trunk tail end of document object model tree.
Main content will be placed in Fig. 2 in <div id=" mainwrapper " > layer, and according to the complexity of application, the nested quantity of level may be more.All elements that drag are all in <div id=" mainwrapper " > layer, such as <div class=" qsitecontainer " ></div>.
Body finally have a <div id=" drag_layer " >, as mask layer, the real process that drags completes in his inside.
Or preferred, steps A 12, after the each placement of document object model tree respectively can pull last father div of the sub-div in element place, adds the div of corresponding mask layer, and is top layer div by its setup of attribute.
In example, multiple page layer are comprised at body matter layer <div id=" mainwrapper " >......</div> layer, such as <div id=" page0 " >......</div>, <div id=" page1 " >......</div>, <div id=" page2 " >......</div>, page layer represents that current browser shows paging.<div id=" page0 " element of >......</div> shows at first page, <divid=" page2 " element in >......</div> shows at second page, <div id=" page2 " element in >......</div> is the 3rd page of demonstration.Can directly in the end after the div structure of one page, add <div id=" drag_layer " > so, be top level structure but this kind of mode need to arrange this structure, and this div div afterwards can be presented on this layer.
Steps A 2, the overlay area that mask layer is set in layout architecture body corresponding to Cascading Style Sheet is the region that the described page shows.
For the element that guarantees to pull moves all the time in mask layer, need to be in the time that structure present tree, the overlay area that mask layer is set in layout architecture body corresponding to Cascading Style Sheet comprises the region at each removable element place.The coordinate that generally, mask layer overlay area can be set is the coordinate of browser display window.Play up calculated amount in order to save, the region that the application preferably covers mask layer is fixedly installed the region showing into the described page.
Described mask layer is covered on the picture element building with absolute layout type;
And/or described mask layer is covered on the picture element building with streaming layout type.
The picture element that described absolute layout type builds comprises the picture element of nine grids form and/or the picture element of 12 palace lattice.In actual displayed, when in viewing area, picture element drags, be trailing with the form of picture element.
Step 120, creates second picture element corresponding to the first picture element being pulled at mask layer, described second picture element is the picture comprising in the content-data of the first picture element;
Preferably, the drag motions of intercepting the first picture element in page display area starts, and adds mask layer, and the step that creates the second picture element that the first picture element of being pulled is corresponding at mask layer comprises:
Step B1, listens to mouse drag motions and starts, and obtains the content-data in Cascading Style Sheet position data, document object model tree structured data and the document object model tree structure of the first picture element;
Mouse event generally has three kinds: press down, and mobile move, up upsprings.Can add mouse and intercept event and intercept the action of mouse, in the time listening to down+move, can judge that the drag motions of mouse starts.
When mouse is pressed and starts to move, it has indicated the position of the first picture element being pulled, so can be by the Cascading Style Sheet position data of the first picture element of this position, the content-data in document object model tree structured data and document object model tree structure obtains.Such as the document object model tree structure of an element is <div class=" qsitecontainer " ></div>, content-data in its document object model tree structure is so " qsitecontainer ", its Cascading Style Sheet position data comprises this element region, such as coordinate of four jiaos of rectangular area etc.
The drag motions of intercepting the first picture element in page display area in addition, starts step and comprises:
When listening to mouse and pressing, judge whether mouse belongs to effective coverage by lower area; If so, listen to mouse and whether start to move, if so, load described mask layer.
The application also can arrange the effective coverage pulling, and such as the rectangular area that an element occupies, this rectangle is set so and wherein for pulling effective coverage, in the time that mouse does not drop on this region, can not carries out drag motions in 1/4 sub-rectangular area.When mouse drops on this region, start to move when listening to mouse, add mask layer, start to enter drag motions processing.
In addition, in the time listening to mouse and upspring, judge region according to current mouse place coordinate, and determine described the 3rd picture element according to the one-to-one relationship of described region and the 3rd picture element.
In the application, whole region, page place can subregion processing, whole region can be divided into multiple regions, and each region is corresponding with corresponding the 3rd picture element.
Such as, if the picture element showing with nine grids form can be divided into full page region nine regions so: upper left, in upper, upper right, left, center, right, lower-left, under, bottom right.Respectively from left to right, from corresponding first to the 9th picture element under upper.So in the time that mouse is upspring in lower right area, can judge that element corresponding to the current target area pulling is the 9th picture element.
Step B2 creates the second picture element corresponding with the first picture element according to described Cascading Style Sheet position data and document object model tree structured data in described mask layer;
Based on the mask layer building in abovementioned steps, known activation is covered on the content layer of current demonstration while interpolation, can in mask layer, create so the second picture element with the first picture element model identical.Generally based on the first picture element corresponding document object model tree structure, i.e. div structure creates the document object model tree structure identical document object model tree structure corresponding with the first picture element in mask layer; Meanwhile, it is identical with the Cascading Style Sheet position data of the first picture element that the Cascading Style Sheet position of second picture element is arranged to data, and the position data of general the first picture element comprises wide, high, place coordinate of its region etc.
Step B3, is set to described second picture element by the content-data in described document object model tree structure according to document object model tree version.
Then, the content-data in the document object model tree structure of the first picture element is given in the document object model tree structure of second picture element.So, can guarantee that second picture element appears at the position at the first picture element place, and similar to the first picture element.
The example code that content-data in described document object model tree structure is set to described second picture element according to document object model tree version is as follows:
Such as in function onDragStart (e) function when listen to element mouse drag motions time, add mask layer draglayer, and in mask layer, create second picture element gost. $ element, and give second picture element the Cascading Style Sheet position attribution of the first picture element etc.
Step 130, intercepts the movement that pulls of second picture element, according to pulling the mobile position that described second picture element is set.
Obtain the coordinate in mouse moving process, and the coordinate of described second picture element is changed with the coordinate in described mouse moving process.In mouse moving process, the coordinate of mouse can correspondingly change, and so in order to make second picture element also along with mouse moves, the coordinate of second picture element also need to be along with the coordinate of mouse changes and changes accordingly so.
Such as in function onDragAppMove (e) function, while pulling, in mouse moving process, there is coordinate (x, y), with the first upper right corner, picture element position coordinate (X, Y) be benchmark, (x, y) in mouse moving process and (X, Y) are calculated and processed, the position that can obtain the second picture element of current movement, second picture element converts with coordinate transform.
Step 140, the drag motions of intercepting the first picture element in page display area finishes, and hides described mask layer, according to the 3rd picture element of drag motions end, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged.
In the time listening to the upspringing of mouse (up) action, now can hide mask layer, for user side, now mask layer is just invisible, while upspringing according to mouse, indication the 3rd picture element, exchanges the content-data of the content-data of the first picture element and the 3rd picture element simultaneously.
Preferably, according to the 3rd picture element of drag motions end, when being exchanged, the content-data of the content-data of the first picture element and the 3rd picture element comprises:
Step C1, listens to drag motions and finishes, if while there is content-data in document object model tree structure corresponding to the 3rd picture element corresponding to region, obtain the content-data in the document object model tree structure that the 3rd picture element is corresponding.
Further comprise:
Judge that drag motions end pulls mouse region whether in the preset range of the 3rd picture element region;
If so, determine that the picture element that described drag motions end pulls mouse region is the 3rd picture element.
When mouse is upspring, corresponding region while upspringing according to mouse, can indicate the 3rd picture element and the position thereof pulling.Now, in the time there is displaying contents in the 3rd picture element position, while there is content-data in its corresponding DOM Document Object Model object model tree construction, obtain the 3rd picture element corresponding document object model tree structure in content-data.If no, do not obtain, be directly set to content-data in the document object model tree structure to be exchanged of the 3rd picture element for empty.
Step C2, keep Cascading Style Sheet position and the document object model tree structure of the first picture element and the 3rd picture element constant, and the content-data in corresponding the first picture element document object model tree structure is exchanged with the content-data in the corresponding document object model tree structure of the 3rd picture element.
Content-data in the document object model tree structure of the first picture element and the 3rd picture element is exchanged, so, the content of the first picture element and the 3rd picture element has been changed mutually, but the Cascading Style Sheet position of the first picture element and the 3rd picture element and document object model tree structure all do not change.
Preferably, described in intercept the first picture element in page display area drag motions finish, hide described mask layer step and comprise:
Delete the second picture element creating in described mask layer.
In order to save system resource, when time drag motions finishes, while hiding mask layer, the interim second picture element creating in mask layer can be deleted.
Such as in function onDragAppUp (e) function, arrange and delete the function of second picture element and the function of hiding mask layer,, hide mask layer, and the interim second picture element creating in mask layer deleted.
Step 150, only plays up exchanged first picture element and three picture element in the region showing at the described page.
Such as the nine grids form page with absolute layout setting, each grid is presented on the page with the form of CSS absolute fix.If the content of the first picture element and the 3rd picture element is replaced, can play up so the content after the first picture element and the 3rd picture element are replaced, and again play up the structure of mask layer, the nine grids page after replacing can be shown.
Again such as, with a row or multi-row picture element of streaming layout setting, replace after the content of first and the 5th picture element of first row, only need play up first and the content of the 5th each picture element, and can show after mask layer.
In the application, the general content that only need redraw the 3rd picture element and the first picture element, refluxes and redraws mask layer position and content.Because the position of the 3rd picture element and the first picture element does not change, therefore need not reflux and calculate the 3rd picture element and the first picture element and the position of the element after the position of two elements in document object model tree.Only needing refluxes calculates the position of the mask layer in rearmost position, and in mask layer in rearmost position, the movement of element does not affect the position calculation of element above.Therefore the application has greatly reduced the calculated amount pulling in process, raises the efficiency, and has reduced resource consumption.
With reference to Fig. 3, it is that the picture element of the application while adopting 12 palace lattice layout pulls example.
In figure, the dom tree structure of the htlm language of the page can be as shown in Figure 2.As for the tail end in body in dom tree structure, and be top level structure by mask layer structure.
Wherein, display page viewing area is 301, and mask layer is 302, in the drawings because mask layer does not have imbody, so mask layer 302 does not mark; In the drawings, described mask layer has comprised page display area 301.
In the time that mouse is pressed, whether coordinate when system is intercepted and obtained current mouse and press belongs to effective coverage.Judge in this example coordinate when mouse is pressed whether in figure from left to right, the effective coverage of second picture element 310 correspondence from top to bottom;
If, whether intercept mouse starts mobile, if start mobile, activate and add described mask layer 302, and in described mask layer 302, create with described second picture element 310 and there is the second picture element 320 of identical content, the coordinate of described second picture element 310 is given to the second picture element 320 in mask layer simultaneously, can be shown in the position of described second picture element 310.
In mouse moving process, obtain the coordinate in mouse moving process, given the second picture element 320 in described mask layer, make described second picture element 320 can follow mouse and move and move.
In the time upspringing in mouse arrival target location, mask layer under hiding, here, has hidden described mask layer and can hide the second picture element 320 creating in mask layer, also described second picture element 320 can be deleted.And judge the region under the coordinate of current mouse, and according to the corresponding relation of the picture element of region and current region, determine the 3rd picture element.While upspringing such as mouse, the region at its place is " Taobao " place picture element 330 in figure.
Determining after the 3rd picture element, after the Target Photo element of having confirmed to pull, by described by the content in the picture element of second position, such as picture, link, documents etc., replace with the content of (such as the picture element 330 at Taobao place) in described the 3rd picture element, keep the coordinate attributes of above-mentioned two picture elements and structure attribute constant.
Then the picture element of two positions after replacing is played up, and described hiding mask layer is played up, the page can be shown.
With reference to Fig. 4, the structural representation that it shows a kind of picture element display device of the application, comprising:
Mask layer adds module 510, starts for the drag motions of intercepting page display area the first picture element, adds mask layer; Wherein said mask layer is added in page documents object model tree after last element position, and described mask layer brings to Front, and the region that described mask layer covers comprises the region that the page shows;
Second picture element creation module 520, for create second picture element corresponding to the first picture element being pulled at mask layer, described second picture element is the picture comprising in the content-data of the first picture element;
Second picture element is modules dragged 530, for intercepting the movement that pulls of second picture element, according to pulling the mobile position that described second picture element is set;
Content processing module 540, finish for the drag motions of intercepting page display area the first picture element, hide described mask layer, according to the 3rd picture element of drag motions end, the content-data of the content-data of the first picture element and the 3rd picture element is exchanged;
Play up display module 550, only play up the first exchanged picture element and the 3rd picture element for the region showing at the described page.
Preferably, described second picture element creation module comprises:
The first data acquisition submodule, starts for listening to mouse drag motions, obtains the content-data in structured data and the document object model tree structure of position data, document object model tree of the Cascading Style Sheet of the first picture element;
First creates submodule, for creating the second picture element corresponding with the first picture element according to the position data of described Cascading Style Sheet and the structured data of document object model tree at described mask layer;
Assignment submodule, for being set to described second picture element by the content-data of described document object model tree structure according to document object model tree version.
The module of preferably, adding described mask layer comprises:
Document object model tree is added submodule, in document object model tree corresponding to the page, after the position of last element, adds mask layer structure in advance;
Style setting submodule is the region that the described page shows for the overlay area of mask layer is set at layout architecture body corresponding to Cascading Style Sheet.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
Add the div of corresponding mask layer at the trunk tail end of document object model tree.
Preferably, in document object model tree corresponding to the page, after the position of last element, while adding mask layer structure, comprise in advance:
After the each placement of document object model tree respectively can pull last father div of the sub-div in element place, add the div of corresponding mask layer, and be top layer div by its setup of attribute.
Preferably, described content processing module comprises:
Delete submodule, the second picture element creating for deleting described mask layer.
Preferably, described content processing module comprises:
The 3rd picture element obtains submodule, being used for listening to drag motions finishes, if while there is content-data in document object model tree structure corresponding to the 3rd picture element corresponding to region, obtain the content-data in the document object model tree structure that the 3rd picture element is corresponding;
Replace submodule, for keeping Cascading Style Sheet position and the document object model tree structure of the first picture element and the 3rd picture element constant, and the content-data in corresponding the first picture element document object model tree structure is exchanged with the content-data in the corresponding document object model tree structure of the 3rd picture element.
Preferably, add module at described mask layer, described in intercept the first picture element in page display area drag motions comprise while starting:
Judge submodule, in the time listening to mouse and press, judge whether mouse belongs to effective coverage by lower area; If so, listen to mouse and whether start to move, if so, load described mask layer.
Preferably, further comprise::
Pull end region judge module, for judging that drag motions end pulls mouse region whether in the preset range of the 3rd picture element region;
If so, determine that the picture element that described drag motions end pulls mouse region is the 3rd picture element.
Preferably, described mask layer is covered on the picture element building with absolute layout type;
And/or described mask layer is covered on the picture element building with streaming layout type.
Preferably, the picture element that described absolute layout type builds comprises the picture element of nine grids form and/or the picture element of 12 palace lattice.
For system embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, relevant part is referring to the part explanation of embodiment of the method.
Each embodiment in this instructions all adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment, between each embodiment identical similar part mutually referring to.
Finally, also it should be noted that, in this article, relational terms such as the first and second grades is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply and between these entities or operation, have the relation of any this reality or sequentially.
The embodiment of the present application can be embodied in the acquisition of any support graphics process, internet content and the device (or multiple device) played up on.These devices include but not limited to personal computer, cluster server, mobile phone, workstation, embedded system, game machine, TV, Set Top Box, or any other supported the calculation element that computer graphical and content show.These devices can include but not limited to have to be carried out and one or more processors of save command and the device of storer.These devices can comprise software, firmware and hardware.Software can comprise one or more application programs and operating system.Hardware can include but not limited to processor, storer and display.
Although described the application's preferred embodiment, once those skilled in the art obtain the basic creative concept of cicada, can make other change and modification to these embodiment.So claims are intended to be interpreted as comprising preferred embodiment and fall into all changes and the modification of the application's scope.
A kind of picture element display packing and the device that above the application are provided, be described in detail, applied principle and the embodiment of specific case to the application herein and set forth, the explanation of above embodiment is just for helping to understand the application's method and core concept thereof; , for one of ordinary skill in the art, according to the application's thought, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application meanwhile.