CN109901766A - Moving method, device and the electronic equipment of document viewport - Google Patents
Moving method, device and the electronic equipment of document viewport Download PDFInfo
- Publication number
- CN109901766A CN109901766A CN201711284164.1A CN201711284164A CN109901766A CN 109901766 A CN109901766 A CN 109901766A CN 201711284164 A CN201711284164 A CN 201711284164A CN 109901766 A CN109901766 A CN 109901766A
- Authority
- CN
- China
- Prior art keywords
- document
- moved
- viewport
- document viewport
- user
- 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.)
- Granted
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
Moving method, device and the electronic equipment of a kind of document viewport provided in an embodiment of the present invention.This method can be after the state that document viewport to be moved is arranged be moving condition;When detecting first operation of the user in document viewport to be moved, using the operating position of the first operation as initial position;When detecting second operation of the user in document viewport to be moved, using the operating position of the second operation as final position;By comparing initial position and final position, the amount of movement of document viewport to be moved is obtained, so that the displacement variable of scrolling of document item be arranged, document viewport to be moved is easily moved to realize, improves user experience.
Description
Technical field
The present invention relates to computer application technology, more particularly to a kind of moving method of document viewport, device and
Electronic equipment.
Background technique
Existing office documents software for editing such as WPS, Microsoft Office open text when showing document to user
After shelves, the content of the document is shown to user by document viewport.Wherein, document viewport are as follows: used in office documents software for editing
In the region of display document content.
When the page width of document is wider and/or page height is higher, document may result in beyond document viewport
Range, and then document viewport can not show all the elements of document.In this way in situation, if user into document viewport to be checked not
When the content of display, generally document viewport can be made to move on document by adjusting scroll bar, or pass through roll mouse
Idler wheel moves document viewport on document.
However, on the one hand, user is by adjusting scroll bar in document viewport mobile on document, and user is firstly the need of finding
Narrow rolling strip area, then document viewport is moved by adjusting horizontal scroll bar and/or vertical scroll bar.
On the other hand, for user through roll mouse idler wheel in mobile document viewport on document, user can only pass through mouse
Idler wheel moves up and down document viewport, cannot move left and right document viewport.That is, when user wants to check that document viewport is shown
When showing the content at left and right sides of content, document viewport can only be moved by adjusting horizontal scroll bar, to meet the above-mentioned of user
Demand.In summary, the mode of document viewport is moved on document in the prior art, inconvenient victory reduces user experience.
Summary of the invention
Moving method, device and the electronic equipment for being designed to provide a kind of document viewport of the embodiment of the present invention, with reality
Now convenient and fast mobile document viewport, improves user experience.Specific technical solution is as follows:
In a first aspect, providing a kind of moving method of document viewport, this method may include:
The state that document viewport to be moved is arranged is moving condition, and the document viewport to be moved is used for displaying target document
The region of content;
When detecting first operation of the user in the document viewport to be moved, the operation of first operation is obtained
Position, as initial position;
When detecting second operation of the user in the document viewport to be moved, the operation of first operation is obtained
Position, as final position;
Compare the initial position and the final position, obtains the amount of movement of the document viewport to be moved;
Based on the amount of movement, the displacement variable of scrolling of document item is set;
According to the displacement variable, the mobile document viewport to be moved on the destination document.
In an optional example, the state of the setting document viewport to be moved is moving condition, may include:
When detecting that user is directed to the start-up operation of the first preset function key, the unlatching of document viewport moving condition is generated
Instruction;
Based on the open command, the state that document viewport to be moved is arranged is moving condition.
It is described according to the displacement variable in an optional example, on the destination document it is mobile it is described to
After mobile document viewport, the method can also include: when the closing for detecting user for the first preset function key
When operation or the start-up operation of the second preset function key, the out code of document viewport moving condition is generated;
Based on the out code, the non-moving state of the document viewport to be moved is set.
In an optional example, first operation is right in the first default combination operation of one of following situations
The pressing operation of input equipment preset key;The pressing operation executed in second default combination operation by touch control object;To mouse
Clicking operation;The clicking operation executed by touch control object.
In an optional example, second operation is one of following situations: the described first default combination behaviour
The release of input equipment preset key is operated in work;It is grasped in the second default combination operation by the release that touch control object executes
Make;To the clicking operation of mouse;The clicking operation executed by touch control object.
In an optional example, when first as user in the document viewport to be moved operates, obtain
The operating position of first operation, after initial position, the method can also include: that refusal executes first behaviour
Make or first operates the corresponding default response of affiliated combination operation;
It is described when detect user in the document viewport to be moved second operation when, obtain it is described second operation
Operating position, after final position, the method can also include: that refusal executes second operation or the second operation institute
Belong to the corresponding default response of combination operation.
Second aspect provides a kind of mobile device, the apparatus may include: the first setup module, first obtain mould
Block, second obtain module, comparison module, the second setup module and mobile module;
Wherein, first setup module, the state for document viewport to be moved to be arranged is moving condition, described wait move
Dynamic document viewport is used for the region of displaying target document content;
It is described first obtain module, for when detect user in the document viewport to be moved first operation when,
The operating position for obtaining first operation, as initial position;
It is described second obtain module, for when detect user in the document viewport to be moved second operation when,
The operating position for obtaining first operation, as final position;
The comparison module obtains the document view to be moved for the initial position and the final position
The amount of movement of mouth;
The displacement variable of scrolling of document item is arranged for being based on the amount of movement in second setup module;
The mobile module is used for according to the displacement variable, the mobile text to be moved on the destination document
Shelves viewport.
In an optional example, first setup module is specifically used for: when detecting that user is default for first
When the start-up operation of function key, the open command of document viewport moving condition is generated;Based on the open command, it is arranged to be moved
The state of document viewport is moving condition.
The third aspect provides a kind of electronic equipment, which may include: processor, communication interface, memory
And communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method step of first aspect
Suddenly.
Moving method, device and the electronic equipment of a kind of document viewport provided in an embodiment of the present invention.This method can be
The state of document viewport to be moved is set for after moving condition;When detect user in document viewport to be moved first operation
When, using the operating position of the first operation as initial position;When detect user in document viewport to be moved second operation
When, using the operating position of the second operation as final position;By comparing initial position and final position, document to be moved is obtained
The amount of movement of viewport, so that the displacement variable of scrolling of document item is arranged, according to this displacement variable, in above-mentioned destination document
The upper above-mentioned document viewport to be moved of movement.It can be seen that in scheme provided in an embodiment of the present invention, on document mobile document viewport into
And when showing the different content in document to user, scroll bar is directly operated without user, but is grasped in document viewport
Make, movement of the document viewport on document can be realized, compared to scroll bar is directly operated, it is convenient to operate, and improves user's body
It tests.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
It obtains other drawings based on these drawings.
Fig. 1 is a kind of flow diagram of the moving method of document viewport provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of the document views part of view page provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of mobile device provided in an embodiment of the present invention;
Fig. 4 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The moving method that the present invention implements the document viewport provided can be applied in such as WPS, Microsoft Office etc.
In documents editing class client.
Fig. 1 is a kind of flow diagram of the moving method of document viewport provided in an embodiment of the present invention.As shown in Figure 1,
The executing subject of this method can be client, this method comprises:
Step 110, the state of setting document viewport to be moved are moving condition, and document viewport to be moved is used for displaying target
The region of document content.
Specifically, document viewport to be moved can be in destination document after setting moving condition for document viewport to be moved
Upper movement.Destination document may include the document of various types object (such as picture, text, table, figure).
Client is arranged the state of document viewport to be moved and may is that client detects user for the step of moving condition
For the start-up operation of the first preset function key, the open command of document viewport moving condition is generated;Based on the open command, visitor
The state that document viewport to be moved is arranged in family end is moving condition.Wherein, the first preset function key, which can be, is set in advance in work
Has the key in the view page on column, such as the first preset function key can be " document viewport is mobile " key, as shown in Fig. 2, should
The right side of the general view in the document views part of view page can be set in " document viewport is mobile " key.
Step 120, when detect user in document viewport to be moved first operation when, obtain first operation operation
Position, as initial position.
First operation of the user in document viewport to be moved can be pre- to input equipment in the first default combination operation
If the pressing operation executed in the pressing operation of key, the second default combination operation by touch control object, to the clicking operation of mouse or
The clicking operation executed by touch control object.Wherein, input equipment can be mouse, keyboard, and touch control object can be touch-control touch screen
The objects such as stylus, human finger.
It may include the programmable button to keyboard to the pressing operation of input equipment preset key in first default combination operation
It carries out pressing operation, pressing operation etc. is carried out to the left button or right button of mouse.Wherein, the programmable button of keyboard can be keyboard
Any key.
Above-mentioned first default combination operation may is that drag during pressing mouse programmable button mouse to mouse it is default by
The combination operation that key is released;
Above-mentioned first default combination operation clicks directionkeys to programmable button during may is that pressing keyboard programmable button
The combination operation being released.
The case where the application is only illustrated for above-mentioned, default combination operation is not limited in above two.
Above-mentioned second default combination operation may is that press touch screen by stylus drags stylus to touch-control in the process
The combination operation that pen is released.
User may include clicking to the left button of mouse or double click operation to the clicking operation of mouse, and to mouse
Right button clicked or double click operation.
User by the clicking operation that touch control object executes may include by touch control object execute click or double click operation.
It further, will when client detects that one of the above first of the user in document viewport to be moved operates
The position for carrying out the first operation is denoted as initial position, that is, calculates the initial position of document viewport amount of movement to be moved.
In a kind of implementation, when detecting first operation of the user in document viewport to be moved, the first behaviour is obtained
The operating position of combination operation belonging to work or the first operation, after initial position, client can be refused to execute the first behaviour
Make corresponding all default responses, the corresponding default response of the first operation may include showing menu item to user, turning annotation
Blank etc. between editable state, the content for choosing destination document, hidden page is changed to operate.Wherein, the content of destination document is
All types of document objects in destination document, document object can be picture, text or figure etc..
Above-mentioned implementation is illustrated below by specific example:
The first situation, it is assumed that the first operation is the clicking operation executed by touch control object, the default response of the first operation
It is after showing that right-click menu, user execute clicking operation by touch control object on terminal touch screen to user, as executing subject
Client can obtain the operating position, as initial position, and refuse to user show right-click menu.
Second situation, it is assumed that the first operation is clicking operation to right mouse button, the default response of the first operation be to
After user shows that right-click menu, user click the right button of mouse, the client as executing subject can obtain right mouse button
Click location is refused to execute to user and shows right-click menu as initial position.
The third situation, it is assumed that the first operation is to grasp in the first default combination operation to the pressing of input equipment preset key
Make, the default response of the first operation is to choose the content of destination document (such as picture or text), and user executes the first default combination
In operation to the pressing operation of input equipment preset key after, the client as executing subject can obtain execute the first preset group
To the position of the pressing operation of input equipment preset key as initial position in closing operation, and refuses to execute and choose destination document
Content.
4th kind of situation, it is assumed that the first operation is the pressing operation executed in the second default combination operation by touch control object,
The default response of first operation is to choose the content of destination document (such as picture or text), and user executes the second default combination operation
In by touch control object execute pressing operation after, the client as executing subject can obtain execute the second default combination operation
In the position of pressing operation that is executed by touch control object as initial position, and refuse execution and choose the content of destination document.
To sum up, when user carries out the first operation in document viewport to be moved, client can only obtain the behaviour of the first operation
Make position, using the operating position as initial position, is not carried out that the first operation is corresponding to choose response, ensure that text to be moved
The visibility that content is shown in shelves viewport, further improves user experience.
Step 130, when detect user in document viewport to be moved second operation when, obtain second operation operation
Position, as final position.
Second operation of the user in document viewport to be moved can be pre- to input equipment in the first default combination operation
If the release operation of key, the release operation executed by touch control object in the second default combination operation, to the clicking operation of mouse or
The clicking operation executed by touch control object.
It is similar to above-mentioned first operation, the release operation of input equipment preset key can wrap in the first default combination operation
It includes and release operation is carried out to the programmable button of keyboard, and release operation etc. is carried out to the left button or right button of mouse.
Above-mentioned first default combination operation may is that drag during pressing mouse programmable button mouse to mouse it is default by
The combination operation that key is released;
Above-mentioned first default combination operation clicks directionkeys to programmable button during may is that pressing keyboard programmable button
The combination operation being released.
The case where the application is only illustrated for above-mentioned, default combination operation is not limited in above two.
Above-mentioned second default combination operation may is that press touch screen by stylus drags stylus to touch-control in the process
The combination operation that pen is released.
User may include clicking to the left button of mouse or double click operation to the clicking operation of mouse, and to mouse
Right button clicked or double click operation.
User by the clicking operation that touch control object executes may include by touch control object execute click or double click operation.
It further, will when client detects that one of the above second of the user in document viewport to be moved operates
The position for carrying out the second operation is denoted as final position, that is, calculates the final position of document viewport amount of movement to be moved.To realize
Mobile document viewport to be moved, then final position is different from initial position.
Aforementioned cited the first operation and the second operation and intercombination occur, such as:
When the first operation be in the first default combination operation to the pressing operation of keyboard or mouse preset key when, corresponding the
Two operations operate for the release to keyboard or mouse preset key.
When the first operation is the pressing operation executed in the second default combination operation by touch control object, corresponding second behaviour
It is operated as in the second default combination operation by the release that touch control object executes.
When the first operation for mouse click or when double click operation, the second operation be also possible to mouse click or it is double
It hits operation, or passes through clicking of executing of touch control object or double click operation.
When the first operation is by clicking of executing of touch control object or double click operation, second operates and is also possible to pass through touch-control
Object execute click or double click operation, or to mouse click or double click operation.
It is understood that the first operation may be the same or different with the second operation.First operation and the second operation
Between corresponding relationship, can set according to the demand of user, the embodiment of the present invention is it is not limited here.
In a kind of implementation, when detecting second operation of the user in document viewport to be moved, the second behaviour is obtained
Make or second operate belonging to combination operation operating position, after final position, client refusal execute second operation pair
All default responses answered.The corresponding all default responses of second operation may include showing menu item to user, turning annotation
It is changed to editable state and blank etc. between the content of destination document, hidden page is chosen to operate.
Above-mentioned implementation is illustrated below by specific example:
The first situation, it is assumed that the second operation is the clicking operation executed by touch control object, the default response of the second operation
It is after showing that right-click menu, user execute clicking operation by touch control object on terminal touch screen to user, as executing subject
Client can obtain the operating position, as final position, and refuse to user show right-click menu.
Second situation, it is assumed that the second operation is clicking operation to right mouse button, the default response of the second operation be to
After user shows that right-click menu, user click the right button of mouse, the client as executing subject can obtain right mouse button
Click location is refused to execute to user and shows right-click menu as final position.
The third situation, it is assumed that the second operation is to grasp in the first default combination operation to the release of input equipment preset key
Make, the default response of the second operation is to choose the content of destination document (such as picture or text), and user executes the first default combination
After operating in operation to the release of input equipment preset key, the client as executing subject, which can obtain, executes the first preset group
To the position of the release operation of input equipment preset key as final position in closing operation, and refuses to execute and choose destination document
Content.
4th kind of situation, it is assumed that the second operation is to be operated in the second default combination operation by the release that touch control object executes,
The default response of second operation is to choose the content of destination document (such as picture or text), and user executes the second default combination operation
In by touch control object execute release operation after, the client as executing subject can obtain execute the second default combination operation
In the position of release operation that is executed by touch control object as initial position, and refuse execution and choose the content of destination document.
To sum up, when user carries out the second operation in document viewport to be moved, client can only obtain the behaviour of the second operation
Make position, using the operating position as final position, the corresponding default response of the second operation is not carried out, ensure that text to be moved
The visibility that content is shown in shelves viewport, further improves user experience.
Step 140 compares initial position and final position, obtains the amount of movement of document viewport to be moved.
Client is compared the coordinate of initial position with the coordinate of final position, obtains the shifting of document viewport to be moved
Momentum, the amount of movement may include the amount of moving horizontally and vertical movement.Wherein, the amount of moving horizontally of document viewport to be moved and
Vertical movement is no more than the length and height of document viewport to be moved.
Step 150 is based on amount of movement, and the displacement variable of destination document scroll bar is arranged.
The amount of movement of document viewport to be moved is directly proportional to the displacement variable of scroll bar.The movement of document viewport to be moved
Amount and the displacement variable of scroll bar can be expressed as N=L1/L2, and wherein L1 is the amount of movement of document viewport to be moved, and L2 is
The displacement variable of scroll bar, N are greater than 0.
Based on the amount of moving horizontally, vertical movement, the displacement variable and vertical scroll bar of horizontal scroll bar is respectively set
Displacement variable.
Step 160, according to displacement variable, the mobile document viewport to be moved on destination document.
Client is according to the displacement variable of horizontal scroll bar and the displacement variable of vertical scroll bar, on destination document
Mobile document viewport to be moved.
Wherein, if the displacement variable of horizontal scroll bar is x pixel, the displacement variable of vertical scroll bar is y picture
Element, horizontal coordinate range is 0-L in the area coordinate of document viewport to be moved, and vertical coordinate range is 0-H, then document to be moved
The horizontal coordinate for the new position that viewport is moved on destination document is (x, L+x), and vertical coordinate is (y, H+y).
Further, execute step 160 after, when detect user for the first preset function key shutoff operation or
When the start-up operation of the second preset function key, the out code of document viewport moving condition is generated;Based on out code, setting to
The non-moving state of mobile document viewport.The non-moving state of document viewport to be moved is to refuse document viewport to be moved in target
The state moved on document.
In conjunction with Fig. 2, the first preset function key can be " document viewport the is mobile " key being set in advance in view page,
It or may be " document viewport the is non-moving " key being set in advance in view page;Second preset function key can be key
The esc key of disk.
It is below the pressing operation to left mouse button with the first operation, for the second operation is the release operation to mouse.
Client detects that user starts the mobile key of preset document viewport, generates opening for document viewport moving condition
Instruction is opened, so that the state that document viewport to be moved is arranged is moving condition.
When detecting user in document viewport to be moved and execute the pressing in the first default combination operation to left mouse button
When operation, the operating position for executing the operation is obtained, as initial position A, it is corresponding to execute the operation for client refusal at this time
To in destination document picture or text choose operation.
When detecting user in document viewport to be moved and execute the release in the first default combination operation to left mouse button
When operation, the operating position for executing the operation is obtained, as final position B, it is corresponding to execute the operation for client refusal at this time
To in destination document picture or text choose operation.
Client is compared the coordinate position of initial position A and final position B, obtains the water of document viewport to be moved
Translation momentum is 20 pixels and vertical movement is 20 pixels, wherein the horizontal coordinate region of document viewport to be moved is 0
~100, vertical coordinate region is 0~100, N 4.
The change in displacement of horizontal scroll bar in target text is respectively set according to the amount of moving horizontally and vertical movement in client
Amount is 5 pixels for the displacement variable of 5 pixels and vertical scroll bar, thus obtains document viewport to be moved in destination document
On the horizontal zone coordinate of new position that is moved to be (5,105), vertical area coordinate is (5,105).
As it can be seen that this method can be after the state that document viewport to be moved is arranged be moving condition;When detecting that user exists
In document viewport to be moved first operation when, using first operation operating position as initial position;When detecting that user exists
In document viewport to be moved second operation when, using second operation operating position as final position;By comparing start bit
It sets and final position, the amount of movement of document viewport to be moved is obtained, so that the displacement variable of scrolling of document item is arranged, according to this
One displacement variable, the mobile above-mentioned document viewport to be moved on above-mentioned destination document.It can be seen that side provided in an embodiment of the present invention
In case, in document viewport mobile on document and then the different content into user's displaying document, rolling is directly operated without user
Dynamic item, but operated in document viewport, movement of the document viewport on document can be realized, compared to directly operation rolling
Dynamic item, it is convenient to operate, and improves user experience.
Corresponding with the above method the embodiment of the invention also provides a kind of mobile devices, as shown in figure 3, the device can be with
It include: that the first setup module 310, first obtains module 320, second acquisition module 330, comparison module 340, the second setup module
350 and mobile module 360;
Wherein, first setup module 310, the state for document viewport to be moved to be arranged is moving condition, described
Document viewport to be moved is used for the region of displaying target document content;
Described first obtains module 320, for working as the first operation for detecting user in the document viewport to be moved
When, the operating position of first operation is obtained, as initial position;
Described second obtains module 330, for working as the second operation for detecting user in the document viewport to be moved
When, the operating position of first operation is obtained, as final position;
The comparison module 340 obtains the document to be moved for the initial position and the final position
The amount of movement of viewport;
The displacement variable of scrolling of document item is arranged for being based on the amount of movement in second setup module 350;
The mobile module 360, for according to the displacement variable, movement to be described to be moved on the destination document
Document viewport.
Optionally, first setup module 310, is specifically used for: when detecting user for the first preset function key
When start-up operation, the open command of document viewport moving condition is generated;Based on the open command, document viewport to be moved is set
State be moving condition.
Optionally, third setting unit 370, for being moved on the destination document according to the displacement variable
After the document viewport to be moved, when detecting that user is pre- for the shutoff operation of the first preset function key or second
If when the start-up operation of function key, generating the out code of document viewport moving condition;
Based on the out code, the non-moving state of the document viewport to be moved is set.
Optionally, first operation is one of following situations: pre- to input equipment in the first default combination operation
If the pressing operation of key;The pressing operation executed in second default combination operation by touch control object;To the clicking operation of mouse;It is logical
Cross the clicking operation of touch control object execution.
Optionally, second operation is one of following situations: being set in the first default combination operation to input
The release of standby preset key operates;It is operated in the second default combination operation by the release that touch control object executes;To the point of mouse
Hit operation;The clicking operation executed by touch control object.
Optionally, described device can also include: the first refusal module 380 and the second refusal module 390;
First refusal module 380, for obtaining when detecting the first operation of the user in the document viewport to be moved
It is described first operation operating position, after initial position, refusal execute it is described first operation or first operation belonging to
The corresponding default response of combination operation;
Second refusal module 390, for obtaining when detecting the second operation of the user in the document viewport to be moved
It is described second operation operating position, after final position, refusal execute it is described second operation or second operation belonging to
The corresponding default response of combination operation.
As it can be seen that the device can be after the state that document viewport to be moved is arranged be moving condition;When detecting that user exists
In document viewport to be moved first operation when, using first operation operating position as initial position;When detecting that user exists
In document viewport to be moved second operation when, using second operation operating position as final position;By comparing start bit
It sets and final position, the amount of movement of document viewport to be moved is obtained, so that the displacement variable of scrolling of document item is arranged, according to this
One displacement variable, the mobile above-mentioned document viewport to be moved on above-mentioned destination document.It can be seen that side provided in an embodiment of the present invention
In case, in document viewport mobile on document and then the different content into user's displaying document, rolling is directly operated without user
Dynamic item, but operated in document viewport, movement of the document viewport on document can be realized, compared to directly operation rolling
Dynamic item, it is convenient to operate, and improves user experience.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 4, include processor 410, communication interface 420,
Memory 430 and communication bus 440, wherein processor 410, communication interface 420, memory 430 are complete by communication bus 440
At mutual communication,
Memory 430, for storing computer program;
Processor 410 when for executing the program stored on memory 430, realizes following steps:
The state that document viewport to be moved is arranged is moving condition, and the document viewport to be moved is used for displaying target document
The region of content;
When detecting first operation of the user in the document viewport to be moved, the operation of first operation is obtained
Position, as initial position;
When detecting second operation of the user in the document viewport to be moved, the operation of first operation is obtained
Position, as final position;
Compare the initial position and the final position, obtains the amount of movement of the document viewport to be moved;
Based on the amount of movement, the displacement variable of scrolling of document item is set;
According to the displacement variable, the mobile document viewport to be moved on the destination document.
Optionally, the state of the setting document viewport to be moved is moving condition, comprising:
When detecting that user is directed to the start-up operation of the first preset function key, the unlatching of document viewport moving condition is generated
Instruction;
Based on the open command, the state that document viewport to be moved is arranged is moving condition.
Optionally, described according to the displacement variable, the mobile document viewport to be moved on the destination document
Later, the method also includes:
When detect user for the first preset function key shutoff operation or the second preset function key starting
When operation, the out code of document viewport moving condition is generated;
Based on the out code, the non-moving state of the document viewport to be moved is set.
Optionally, first operation is one of following situations:
To the pressing operation of input equipment preset key in first default combination operation;
The pressing operation executed in second default combination operation by touch control object;
To the clicking operation of mouse;
The clicking operation executed by touch control object.
Optionally, second operation is one of following situations:
The release of input equipment preset key is operated in the first default combination operation;
It is operated in the second default combination operation by the release that touch control object executes;
To the clicking operation of mouse;
The clicking operation executed by touch control object.
Optionally, described when detecting first operation of the user in the document viewport to be moved, obtain described the
The operating position of one operation, after initial position, the method also includes:
Refusal executes the corresponding default response of combination operation belonging to first operation or the first operation;
It is described when detect user in the document viewport to be moved second operation when, obtain it is described second operation
Operating position, after final position, the method also includes:
Refusal executes the corresponding default response of combination operation belonging to second operation or the second operation.
As it can be seen that the processor can be after the state that document viewport to be moved is arranged be moving condition;When detecting user
In document viewport to be moved first operation when, using first operation operating position as initial position;When detecting user
In document viewport to be moved second operation when, using second operation operating position as final position;By comparing starting
Position and final position obtain the amount of movement of document viewport to be moved, so that the displacement variable of scrolling of document item is set, according to
This displacement variable, the mobile above-mentioned document viewport to be moved on above-mentioned destination document.It can be seen that provided in an embodiment of the present invention
In scheme, in document viewport mobile on document and then the different content into user's displaying document, directly operated without user
Scroll bar, but operated in document viewport, movement of the document viewport on document can be realized, compared to directly operation
Scroll bar, it is convenient to operate, and improves user experience.
The communication bus that above-mentioned electronic equipment is mentioned can be Peripheral Component Interconnect standard (Peripheral Component
Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
The embodiment of the invention also provides a kind of computer readable storage medium, stored in the computer readable storage medium
There is computer program, the either step in the moving method of document viewport is realized when which is executed by processor.
The embodiment of the invention also provides a kind of computer program products comprising instruction, when it runs on computers
When, so that realizing the either step in the moving method of document viewport when computer executes.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
For the embodiment of electronic equipment, computer readable storage medium and computer program product, since it is substantially similar to method
Embodiment, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of moving method of document viewport, which is characterized in that the described method includes:
The state that document viewport to be moved is arranged is moving condition, the document viewport to be moved are as follows: is used for displaying target document
The region of content;
When detecting first operation of the user in the document viewport to be moved, the operative position of first operation is obtained
It sets, as initial position;
When detecting second operation of the user in the document viewport to be moved, the operative position of second operation is obtained
It sets, as final position;
Compare the initial position and the final position, obtains the amount of movement of the document viewport to be moved;
Based on the amount of movement, the displacement variable of scrolling of document item is set;
According to the displacement variable, the mobile document viewport to be moved on the destination document.
2. the method according to claim 1, wherein the state of the setting document viewport to be moved is mobile shape
State, comprising:
When detecting that user is directed to the start-up operation of the first preset function key, the unlatching for generating document viewport moving condition refers to
It enables;
Based on the open command, the state that document viewport to be moved is arranged is moving condition.
3. according to the method described in claim 2, it is characterized in that, described according to the displacement variable, in the target text
On shelves after the mobile document viewport to be moved, the method also includes:
When detect user for the first preset function key shutoff operation or the second preset function key start-up operation
When, generate the out code of document viewport moving condition;
Based on the out code, the non-moving state of the document viewport to be moved is set.
4. the method according to claim 1, wherein first operation is one of following situations:
To the pressing operation of input equipment preset key in first default combination operation;
The pressing operation executed in second default combination operation by touch control object;
To the clicking operation of mouse;
The clicking operation executed by touch control object.
5. according to the method described in claim 4, it is characterized in that, second operation is one of following situations:
The release of input equipment preset key is operated in the first default combination operation;
It is operated in the second default combination operation by the release that touch control object executes;
To the clicking operation of mouse;
The clicking operation executed by touch control object.
6. according to the method described in claim 5, it is characterized in that, described ought detect user in the document viewport to be moved
In first operation when, obtain it is described first operation operating position, after initial position, the method also includes:
Refusal executes the corresponding default response of combination operation belonging to first operation or the first operation;
The operation that when detecting second operation of the user in the document viewport to be moved, acquisition described second is operated
Position, after final position, the method also includes:
Refusal executes the corresponding default response of combination operation belonging to second operation or the second operation.
7. a kind of mobile device, which is characterized in that described device includes: the first setup module, the first acquisition module, the second acquisition
Module, comparison module, the second setup module and mobile module;
First setup module, the state for document viewport to be moved to be arranged are moving condition, the document view to be moved
Mouth is used for the region of displaying target document content;
Described first obtains module, for obtaining when detecting the first operation of the user in the document viewport to be moved
The operating position of first operation, as initial position;
Described second obtains module, for obtaining when detecting the second operation of the user in the document viewport to be moved
The operating position of first operation, as final position;
The comparison module obtains the document viewport to be moved for the initial position and the final position
Amount of movement;
The displacement variable of scrolling of document item is arranged for being based on the amount of movement in second setup module;
The mobile module, for according to the displacement variable, the mobile document to be moved to be regarded on the destination document
Mouthful.
8. device according to claim 7, which is characterized in that first setup module is specifically used for: when detecting use
When family is directed to the start-up operation of the first preset function key, the open command of document viewport moving condition is generated;
Based on the open command, the state that document viewport to be moved is arranged is moving condition.
9. a kind of electronic equipment, which is characterized in that including processor, communication interface, memory and communication bus, wherein processing
Device, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-6.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium
Program realizes claim 1-6 any method and step when the computer program is executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711284164.1A CN109901766B (en) | 2017-12-07 | 2017-12-07 | Method and device for moving document viewport and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711284164.1A CN109901766B (en) | 2017-12-07 | 2017-12-07 | Method and device for moving document viewport and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109901766A true CN109901766A (en) | 2019-06-18 |
CN109901766B CN109901766B (en) | 2023-03-24 |
Family
ID=66939104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711284164.1A Active CN109901766B (en) | 2017-12-07 | 2017-12-07 | Method and device for moving document viewport and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109901766B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428657A (en) * | 2022-01-11 | 2022-05-03 | 上海万物新生环保科技集团有限公司 | Sliding method and equipment based on Taro framework at H5 end |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101369197A (en) * | 2007-08-16 | 2009-02-18 | 昆盈企业股份有限公司 | Computer window scroll bar control method |
CN101403956A (en) * | 2008-11-12 | 2009-04-08 | 北大方正集团有限公司 | Method and device for large type area navigation reading |
CN101650634A (en) * | 2008-08-11 | 2010-02-17 | 索尼株式会社 | Display apparatus, display method, and program |
CN102257471A (en) * | 2008-10-26 | 2011-11-23 | 思杰系统有限公司 | Panning a native display on a mobile computing device to a window, interpreting a gesture-based instruction to scroll contents of the window, and wrapping text on the window |
CN102722324A (en) * | 2012-05-24 | 2012-10-10 | 中兴通讯股份有限公司 | Method and device for operating touch screen |
CN103995657A (en) * | 2013-02-19 | 2014-08-20 | Lg电子株式会社 | Mobile terminal and control method thereof |
US9405433B1 (en) * | 2011-01-07 | 2016-08-02 | Trimble Navigation Limited | Editing element attributes of a design within the user interface view, and applications thereof |
-
2017
- 2017-12-07 CN CN201711284164.1A patent/CN109901766B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101369197A (en) * | 2007-08-16 | 2009-02-18 | 昆盈企业股份有限公司 | Computer window scroll bar control method |
CN101650634A (en) * | 2008-08-11 | 2010-02-17 | 索尼株式会社 | Display apparatus, display method, and program |
CN102257471A (en) * | 2008-10-26 | 2011-11-23 | 思杰系统有限公司 | Panning a native display on a mobile computing device to a window, interpreting a gesture-based instruction to scroll contents of the window, and wrapping text on the window |
CN101403956A (en) * | 2008-11-12 | 2009-04-08 | 北大方正集团有限公司 | Method and device for large type area navigation reading |
US9405433B1 (en) * | 2011-01-07 | 2016-08-02 | Trimble Navigation Limited | Editing element attributes of a design within the user interface view, and applications thereof |
CN102722324A (en) * | 2012-05-24 | 2012-10-10 | 中兴通讯股份有限公司 | Method and device for operating touch screen |
CN103995657A (en) * | 2013-02-19 | 2014-08-20 | Lg电子株式会社 | Mobile terminal and control method thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114428657A (en) * | 2022-01-11 | 2022-05-03 | 上海万物新生环保科技集团有限公司 | Sliding method and equipment based on Taro framework at H5 end |
CN114428657B (en) * | 2022-01-11 | 2024-04-05 | 上海万物新生环保科技集团有限公司 | Sliding method and equipment based on Taro framework at H5 end |
Also Published As
Publication number | Publication date |
---|---|
CN109901766B (en) | 2023-03-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5510185B2 (en) | Information processing apparatus, program, and display control method | |
US8629837B2 (en) | Method and device for controlling information display output and input device | |
US10228835B2 (en) | Method for displaying information, and terminal equipment | |
CN104035677B (en) | The display methods and device of prompt message | |
US20050223342A1 (en) | Method of navigating in application views, electronic device, graphical user interface and computer program product | |
CN108064368A (en) | The control method and device of flexible display device | |
CN101019092A (en) | Handling and scrolling of content on screen | |
US20140049499A1 (en) | Touch screen selection | |
JP2010530109A (en) | Method, apparatus and computer program product for facilitating data entry via a touch screen | |
CN102023797A (en) | Mobile device and method for controlling pictures browsing | |
CN103455242B (en) | Screen-picture cutting method and device | |
US20070075984A1 (en) | Method and device for scroll bar control on a touchpad having programmed sections | |
CN106681616B (en) | Method, device and equipment for displaying function bar of browser | |
US9805016B2 (en) | Techniques to present a dynamic formula bar in a spreadsheet | |
CN104571813A (en) | Information displaying method and device | |
US20160026309A1 (en) | Controller | |
US20210026527A1 (en) | Method for interaction between at least one user and/or a first electronic device and a second electronic device | |
JP5092985B2 (en) | Content decoration apparatus, content decoration method, and content decoration program | |
CN112269501A (en) | Icon moving method and device and electronic equipment | |
CN108279848A (en) | A kind of display methods and electronic equipment | |
KR100795590B1 (en) | Method of navigating, electronic device, user interface and computer program product | |
CN109901766A (en) | Moving method, device and the electronic equipment of document viewport | |
CN104572997A (en) | Content acquiring method and device and user device | |
CN104765564B (en) | A kind of screenshot method and device | |
KR20080032391A (en) | Method for displaying internet web page in a pda |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |