CN112184795A - Mobile scale construction and function calling method, device and storage medium - Google Patents

Mobile scale construction and function calling method, device and storage medium Download PDF

Info

Publication number
CN112184795A
CN112184795A CN202010986912.6A CN202010986912A CN112184795A CN 112184795 A CN112184795 A CN 112184795A CN 202010986912 A CN202010986912 A CN 202010986912A CN 112184795 A CN112184795 A CN 112184795A
Authority
CN
China
Prior art keywords
scale
time
moving
event
drawn
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.)
Pending
Application number
CN202010986912.6A
Other languages
Chinese (zh)
Inventor
孙猛猛
纪旭宇
郭宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Changzhou Weiyizhi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Weiyi Intelligent Manufacturing Technology Co ltd, Changzhou Weiyizhi Technology Co Ltd filed Critical Shanghai Weiyi Intelligent Manufacturing Technology Co ltd
Priority to CN202010986912.6A priority Critical patent/CN112184795A/en
Publication of CN112184795A publication Critical patent/CN112184795A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention discloses a method for constructing a movable scale, which comprises the following steps: obtaining an interval value corresponding to a range to be drawn; determining and drawing a scale having a proportional length according to the interval value; drawing a pointer, and positioning the pointer and the scale to record the sliding of the scale; drawing scales and calculating the length of the scale; calculating the size of the interval between the scales, and drawing a scale; setting a trigger event corresponding to the drawn scale; conditional snooping of trigger events is performed and a determination is made as to whether to respond. Through the realization of drawing the removal scale, it is accurate to industry big data field numerical value, and audio-visual scene has solved industrial data and has generated fields such as data at industrial parameter, aesthetic property, problem in readability to realized multiunit industrial parameter debugging, record in application development practice, make numerical value record more directly perceived, it is more convenient to operate, greatly improves page show diversification, concreties.

Description

Mobile scale construction and function calling method, device and storage medium
Technical Field
The invention relates to the technical field of construction of a movable scale, in particular to a method and a device for constructing the movable scale and a storage medium.
Background
Traditional scale drawing generally only uses the dom to generate, and it is very huge that the dom draws the scale and removes end performance consumption again, needs multiple dom element to assemble to need monitor different dom incident, and do not have adding of algorithm animation when sliding and hold, the delay that very when leading to stopping, if the scale that uses the dom drawing many times in the page, can make the page card pause, user experience is very not good.
Disclosure of Invention
The invention aims to provide a method, a device and a storage medium for constructing a movable scale, aims to solve the problems of operability, attractiveness and readability of industrial data in the fields of industrial parameters, generated data and the like by drawing the movable scale, and realizes debugging and recording of multiple groups of industrial parameters in application and development practices, so that the numerical value recording is more intuitive, the operation is more convenient and faster, and the page display diversification and concreteness are greatly improved.
In order to achieve the above object, there is provided a moving scale construction method including:
obtaining an interval value corresponding to a range to be drawn;
determining and drawing a scale having a proportional length according to the interval value;
drawing a pointer, and positioning the pointer and the scale to record the sliding of the scale;
drawing scales and calculating the length of the scale;
calculating the size of the interval between the scales, and drawing a scale;
setting a trigger event corresponding to the drawn scale;
conditional snooping of trigger events is performed and a determination is made as to whether to respond.
In one implementation, the step of setting a trigger event corresponding to the drawn ruler includes:
and setting a touch screen event corresponding to the drawn scale.
In one implementation, the step of performing conditional monitoring of the trigger event and determining whether to respond includes:
performing trigger time monitoring of a touch screen event;
and when the monitored time reaches a preset time value, executing response, otherwise, not executing response.
In one implementation, the step of performing a touch event trigger time listening includes:
acquiring the starting time of the touch screen event;
acquiring the time when the duration of the touch screen event is not less than a preset time value according to the starting time;
executing a response based on the acquired time;
otherwise no response is performed.
In one implementation, the method includes the steps of:
triggering an animation playing event based on the acquired time;
monitoring the end time of the touch screen event;
based on the end time, a sliding effect of the scale is exhibited.
The invention also discloses a calling method of the mobile scale function, which comprises the following steps
Adding drawing scale drawing, pointer drawing, animation playing and event monitoring to a constructor of the scale;
taking the constructor as a method class, and introducing numerical parameters as common parameters of the method class;
constructing a framework rollup by combining the front end, configuring a related file, and packaging and compressing the construction function corresponding to the scale into a file;
and calling the compressed file corresponding to the sliding scale.
In one implementation, the method further comprises:
introducing the packed compressed file into an item directory;
instantiates the scale and passes in the required values as parameters.
Also disclosed is a mobile scale construction apparatus comprising a processor, and a memory connected to the processor by a communication bus; wherein the content of the first and second substances,
the memory is used for storing a mobile scale construction program;
the processor is configured to execute the moving scale construction program to implement any one of the moving scale constructions and any one of the steps of the method for calling a moving scale function.
And a storage device, which is a computer storage device, having one or more programs stored thereon, the one or more programs being executable by one or more processors to cause the one or more processors to perform the steps of any one of the moving scale construction and any one of the steps of the method for calling a moving scale function.
The construction method of the mobile scale provided by the embodiment of the invention has the following beneficial effects:
(1) the movable scale is drawn through canvas, the problems of operability, attractiveness and readability of the fields of industrial data, data generation and the like in industrial parameters are solved aiming at the accurate numerical value and visual scene of the industrial big data field, and the debugging and recording of multiple groups of industrial parameters are realized in application and development practice, so that the numerical value recording is more visual, the operation is more convenient and fast, and the page display diversification and concreteness are greatly improved.
(2) Through the realization of removing the scale plug-in, under the diversified condition of considering the big data field data of industry, can expand the slip scale, realize that a scale records multiple data usage to can expand pointer method, render a plurality of pointers simultaneously and record multiple industrial parameter.
(3) The multi-pointer and multi-scale rendering can be controlled only by a parameter transmission mode, the labor cost and the time cost of redevelopment are greatly reduced, the scale is spliced again on the original basis, and the hot plug development plug-in is realized.
Drawings
Fig. 1 is a schematic flow chart of a method for constructing a moving scale according to an embodiment of the present invention.
FIG. 2 is a diagram of an embodiment of a method for constructing a moving scale according to the present invention
Fig. 3 is another specific embodiment of the moving scale constructing method according to the embodiment of the present invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention.
Please refer to fig. 1-3. It should be noted that the drawings provided in the present embodiment are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
As shown in fig. 1 and 2, the present invention provides a moving scale construction method, including:
and S101, acquiring an interval value corresponding to the range to be drawn.
Firstly, a user can determine an interval corresponding to a scale needing to be drawn, the interval represents the length range of the scale to be drawn subsequently, and the range can be set according to the requirements of the user.
And S102, determining and drawing a scale with a proportional length according to the interval value.
And then drawing scales with different proportional lengths according to different interval values by using canvas drawing.
S103, drawing a pointer and positioning the pointer and the scale so as to record the sliding of the scale.
A canvas is used to draw the pointer and to position the scale part to coincide with the pointer part for recording the scale sliding size.
And S104, drawing scales and calculating the length of the scale.
And drawing scales and calculating the length of the scale. A scale bar for drawing a scale, for example from a length of 10cm, would need to have at least 0cm and 10 cm.
And S105, calculating the size of the interval between the scales, and drawing a scale.
It should be noted that, for example, if the scale mark is 1mm, the total length thereof is 10cm, and then 100 unit mark intervals are required. And calculating the interval size of each scale, and displaying the size of each scale of the scale.
And S106, setting a trigger event corresponding to the drawn scale.
It should be noted that, after the ruler is drawn, a trigger event is used to trigger a corresponding event on the ruler, for example, a user wants to bind a touch event to the ruler, monitor finger touch and finger exit events, and perform a sliding effect of the ruler.
S107, performing condition monitoring of the trigger event and determining whether to respond.
In an implementation manner that a user wants to bind a touch event to a scale, monitor finger touches and finger off events, and perform a sliding effect of the scale, the step of setting a trigger event corresponding to the drawn scale includes: and setting a touch screen event corresponding to the drawn scale.
In one implementation, the step of performing conditional monitoring of the trigger event and determining whether to respond includes:
performing trigger time monitoring of a touch screen event;
and when the monitored time reaches a preset time value, executing response, otherwise, not executing response.
Firstly, the condition that the user triggers the event is determined that the time for touching the touch screen by the finger is not less than a preset time value, which indicates that the finger slides on the touch screen, so that a starting position and a stopping position are represented, the determination is performed according to the touch screen time of the finger, and meanwhile, the finger touch operation by mistake can be avoided through the limitation of time periods. The specific operation is as follows:
acquiring the starting time of the touch screen event; acquiring the time when the duration of the touch screen event is not less than a preset time value according to the starting time; executing a response based on the acquired time; otherwise no response is performed.
When the event is triggered, an animation algorithm can be added, and the gradual stopping effect is achieved after the sliding of the scale is stopped, so that the sliding of the scale can be gradually stopped when the finger of the user leaves
In one implementation, the method includes the steps of:
triggering an animation playing event based on the acquired time;
monitoring the end time of the touch screen event;
based on the end time, a sliding effect of the scale is exhibited.
And displaying through an animation effect after the event is triggered, so that the visual effect of the user is further enhanced.
In combination with research and development scenes such as concrete, accurate and precise numerical values of industrial big data, data are recorded in a visual, convenient, quick and accurate display mode, and therefore the plug-in is required to be packaged and abstracted, and therefore the method for calling the function of the mobile scale is provided.
As shown in FIG. 2 and FIG. 3, the present invention also discloses a method for calling a function of a mobile scale, which comprises the steps of
Adding drawing scale drawing, pointer drawing, animation playing and event monitoring to a constructor of the scale;
taking the constructor as a method class, and introducing numerical parameters as common parameters of the method class;
constructing a framework rollup by combining the front end, configuring a related file, and packaging and compressing the construction function corresponding to the scale into a file;
and calling the compressed file corresponding to the sliding scale.
And adding a drawing scale, scales, a pointer, an algorithm animation and an event monitoring extraction into an attribute method of a specific grammar to the constructor of the scale.
The constructor is treated as a method class, and the numerical parameters are introduced as common parameters of the method class.
And combining a front-end construction framework rollup, configuring a related file, and packaging and compressing the construction function of the ruler into a js compressed file.
The developer instantiates the method class can call a sliding scale.
In one implementation, the method further comprises:
introducing the packed compressed file into an item directory;
instantiates the scale and passes in the required values as parameters.
And introducing the packaged js file into the item directory. Instantiating the method class of the ruler, and introducing the required numerical value as a parameter, the mobile ruler can be drawn in the page, and a monitoring function of the method class can be called to do some operations.
This paper draws the realization of removing the scale through canvas, and is accurate to industry big data field numerical value, and audio-visual scene has solved industrial data at industrial parameter, fields such as generated data are at operability, aesthetic property, readable problem to realized multiunit industrial parameter debugging, record in application development practice, made numerical value record more directly perceived, it is more convenient to operate, greatly improves page show diversification, concreties.
Through the realization of removing the scale plug-in, under the diversified condition of considering the big data field data of industry, can expand the slip scale, realize that a scale records multiple data usage to can expand pointer method, render a plurality of pointers simultaneously and record multiple industrial parameter.
The multi-pointer and multi-scale rendering can be controlled only by a parameter transmission mode, the labor cost and the time cost of redevelopment are greatly reduced, the scale is spliced again on the original basis, and the hot plug development plug-in is realized.
Also disclosed is a mobile scale construction apparatus comprising a processor, and a memory connected to the processor by a communication bus; wherein the content of the first and second substances,
the memory is used for storing a mobile scale construction program;
the processor is configured to execute the moving scale construction program to implement any one of the moving scale constructions and any one of the steps of the method for calling a moving scale function.
And a storage device, which is a computer storage device, having one or more programs stored thereon, the one or more programs being executable by one or more processors to cause the one or more processors to perform the steps of any one of the moving scale construction and any one of the steps of the method for calling a moving scale function.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (9)

1. A method of mobile scale construction, the method comprising:
obtaining an interval value corresponding to a range to be drawn;
determining and drawing a scale having a proportional length according to the interval value;
drawing a pointer, and positioning the pointer and the scale to record the sliding of the scale;
drawing scales and calculating the length of the scale;
calculating the size of the interval between the scales, and drawing a scale;
setting a trigger event corresponding to the drawn scale;
conditional snooping of trigger events is performed and a determination is made as to whether to respond.
2. A method of constructing a moving scale according to claim 1 wherein the step of setting a trigger event corresponding to the drawn scale comprises:
and setting a touch screen event corresponding to the drawn scale.
3. A method of constructing a moving scale according to claim 2, wherein the step of performing conditional monitoring of trigger events and determining whether to respond comprises:
performing trigger time monitoring of a touch screen event;
and when the monitored time reaches a preset time value, executing response, otherwise, not executing response.
4. A method for constructing a moving ruler according to claim 3, wherein said step of performing a touch screen event trigger time listening comprises:
acquiring the starting time of the touch screen event;
acquiring the time when the duration of the touch screen event is not less than a preset time value according to the starting time;
executing a response based on the acquired time;
otherwise no response is performed.
5. A method of constructing a moving scale according to claim 3, comprising the steps of:
triggering an animation playing event based on the acquired time;
monitoring the end time of the touch screen event;
based on the end time, a sliding effect of the scale is exhibited.
6. A method for calling a function of a mobile scale is characterized by comprising
Adding drawing scale drawing, pointer drawing, animation playing and event monitoring to a constructor of the scale;
taking the constructor as a method class, and introducing numerical parameters as common parameters of the method class;
constructing a framework rollup by combining the front end, configuring a related file, and packaging and compressing the construction function corresponding to the scale into a file;
and calling the compressed file corresponding to the sliding scale.
7. The method of claim 6, further comprising:
introducing the packed compressed file into an item directory;
instantiates the scale and passes in the required values as parameters.
8. A moving scale construction apparatus comprising a processor and a memory connected to the processor by a communications bus; wherein the content of the first and second substances,
the memory is used for storing a mobile scale construction program;
the processor is configured to execute the moving scale construction program to implement any one of the moving scale constructions and any one of the steps of the method for calling a moving scale function.
9. A storage device, being a computer storage device, having one or more programs stored thereon, the one or more programs being executable by one or more processors to cause the one or more processors to perform the steps of any one of the moving scale construction and any one of the steps of any one of the moving scale function calling method.
CN202010986912.6A 2020-09-18 2020-09-18 Mobile scale construction and function calling method, device and storage medium Pending CN112184795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010986912.6A CN112184795A (en) 2020-09-18 2020-09-18 Mobile scale construction and function calling method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010986912.6A CN112184795A (en) 2020-09-18 2020-09-18 Mobile scale construction and function calling method, device and storage medium

Publications (1)

Publication Number Publication Date
CN112184795A true CN112184795A (en) 2021-01-05

Family

ID=73921818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010986912.6A Pending CN112184795A (en) 2020-09-18 2020-09-18 Mobile scale construction and function calling method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112184795A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140496A (en) * 2007-10-23 2008-03-12 深圳市迅雷网络技术有限公司 Method and device for regulating column frame
CN102323864A (en) * 2011-08-30 2012-01-18 北京神州泰岳软件股份有限公司 Touch screen response method and device and terminal device
CN102609267A (en) * 2012-02-16 2012-07-25 深圳市酷开网络科技有限公司 Plug-in unit management method based on Android browser and system therefor
CN103135818A (en) * 2011-11-28 2013-06-05 联想(北京)有限公司 Quick response operation method and electronic equipment
CN110657760A (en) * 2019-06-11 2020-01-07 北京无限光场科技有限公司 Method and device for measuring space area based on artificial intelligence and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101140496A (en) * 2007-10-23 2008-03-12 深圳市迅雷网络技术有限公司 Method and device for regulating column frame
CN102323864A (en) * 2011-08-30 2012-01-18 北京神州泰岳软件股份有限公司 Touch screen response method and device and terminal device
CN103135818A (en) * 2011-11-28 2013-06-05 联想(北京)有限公司 Quick response operation method and electronic equipment
CN102609267A (en) * 2012-02-16 2012-07-25 深圳市酷开网络科技有限公司 Plug-in unit management method based on Android browser and system therefor
CN110657760A (en) * 2019-06-11 2020-01-07 北京无限光场科技有限公司 Method and device for measuring space area based on artificial intelligence and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
CLARKISME: "ios 滑动标尺 滚动刻度尺 带惯性效果", 《HTTPS://WWW.JIANSHU.COM/P/87740FBCD7FE》 *
SIMMINONGARCIA: "Android自定义滑动刻度尺", 《HTTPS://BLOG.CSDN.NET/WEIXIN_34080951/ARTICLE/DETAILS/91368330》 *
XINGXIAOYIYIO: "js实现H5页面手指滑动刻度尺", 《HTTPS://GITHUB.COM/XINGXIAOYIYIO/H5-RULER》 *

Similar Documents

Publication Publication Date Title
CN107748641B (en) Numerical value adjustment control method and device, electronic equipment and storage medium
EP2869174A1 (en) Method and device for text input and display of intelligent terminal
TWI671647B (en) Method, device and electronic device for calculating the duration of the first screen of a page
CN107451244B (en) Folder naming method, mobile terminal and computer readable storage medium
CN108089958A (en) GPU test methods, terminal device and computer readable storage medium
CN103547988A (en) Method for selecting an element of a user interface and device implementing such a method
KR0140548B1 (en) Graphical setting method and device of multiple parameter range
CN108228300B (en) Method and device for controlling real-time refreshing of content
CN101650628B (en) Electric device with touch screen and control method thereof
CN114489648A (en) Page generation method, system, terminal and medium
CN114115681A (en) Page generation method and device, electronic equipment and medium
CN107193729A (en) A kind of application compatibility method of testing and device
CN113648649B (en) Game interface control method and device, computer readable medium and terminal equipment
CN112184795A (en) Mobile scale construction and function calling method, device and storage medium
CN104317492A (en) Wallpaper setting method
CN111399721A (en) Method, device, storage medium and terminal for triggering search on display interface
CN110990006A (en) Form management system and form generation device
CN107612981B (en) Application program method for pushing, device, terminal and computer readable storage medium
CN115729549A (en) Method and device for generating user interaction interface, storage medium and electronic device
CN110971956A (en) Video frame previewing method and device
CN111880889B (en) Interface display method and device, electronic equipment and storage medium
CN108268298A (en) Generation method, device, storage medium and the electronic equipment of desktop icons
CN107885452A (en) 3D Touch analogy methods and device, computer installation and computer-readable recording medium
CN113407078A (en) Method and device for editing character icon, storage medium and terminal
CN105278864A (en) Document management method and system in electronic equipment provided with touch display screen

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210105

RJ01 Rejection of invention patent application after publication