Disclosure of Invention
In view of the above, embodiments of the present invention provide a layout processing method, apparatus and computer storage medium, so as to solve the problem in the prior art that the use experience of a user is affected.
In order to achieve the above object, the embodiment of the present invention provides the following technical solutions:
a first aspect of an embodiment of the present invention shows a layout processing method, applied to a product design system, the method including:
acquiring a change setting parameter for a first object;
adjusting a main container of the first object based on the changed setting parameters, and determining basic data corresponding to the adjusted main container;
the other containers in the first object are laid out based on the basic data corresponding to the main container;
and forming a target object based on the other containers after layout and the main container after adjustment.
Optionally, the determining the adjusted basic data corresponding to the main container includes:
determining a first layout setting mode of a main container of the first object;
adjusting the container size of the main container of the first object according to a first layout setting mode based on the change setting parameters;
and adjusting other parameters of the main container of the first object according to the change setting parameters.
Optionally, the adjusting the container size of the main container of the first object according to the first layout setting mode based on the modification setting parameter includes:
if the first layout setting mode is determined to be the adaptive layout, controlling the main container to perform adaptive operation based on the container parameters of the changed setting parameters so as to adjust the container size of the main container of the first object;
and if the first layout setting mode is determined to be the fixed layout, changing the container size of the main container according to the container parameters in the container parameters for changing the setting parameters.
Optionally, the layout of other containers in the first object based on the basic data corresponding to the main container includes:
determining first position relations between the main container of the first object and other containers respectively;
and adjusting the layout of other containers based on the first position relation between the main container of the first object and the other containers and the basic data corresponding to the main container.
Optionally, the layout of other containers in the first object based on the basic data corresponding to the main container includes:
determining first position relations between the main container of the first object and other containers respectively;
determining the positions of other containers in the first object based on the first position relation between the main container of the first object and the other containers and the basic data corresponding to the main container;
for each other container, adjusting the layout of the other container according to the second layout setting mode of the other container based on the position of the other container.
Optionally, the adjusting the layout of the other containers according to the second layout setting manner of the other containers based on the positions of the other containers includes:
controlling the other containers to perform adaptation operation based on the container parameters of the changed setting parameters to adjust the container sizes of the other containers of the first object if the second layout setting mode is determined to be the adaptation layout;
if the second layout setting mode is determined to be full layout, performing full operation on the other containers according to the size of the screen to be designed corresponding to the changed setting parameters so as to adjust the container sizes of the other containers of the first object;
and if the second layout setting mode is determined to be the fixed layout, changing the container sizes of the other containers according to the container parameters in the container parameters for changing the setting parameters.
Optionally, the method further comprises:
receiving a first input operation for a button container in a first object;
and adjusting the position of the button container in response to the first input operation.
Optionally, receiving a first modification operation for a primary container in the first object;
responding to the first modification operation, adjusting the main container, and determining basic data corresponding to the adjusted main container;
the other containers in the first object are laid out based on the basic data corresponding to the main container;
and forming a target object based on the other containers after layout and the main container after adjustment.
A second aspect of an embodiment of the present invention shows a layout processing apparatus applied to a product design system, the apparatus including:
an acquisition unit configured to acquire a change setting parameter for a first object;
the processing unit is used for adjusting the main container of the first object based on the change setting parameters and determining basic data corresponding to the adjusted main container; the other containers in the first object are laid out based on the basic data corresponding to the main container; and forming a target object based on the other containers after layout and the main container after adjustment.
An embodiment of the present invention shows a third aspect of the present invention, which shows a computer storage medium, where the computer storage medium includes a stored program, where, when the program runs, a device where the storage medium is controlled to execute the layout processing method shown in the first aspect of the embodiment of the present invention.
Based on the layout processing method, the device and the computer storage medium provided by the embodiment of the invention, the method comprises the following steps: acquiring a change setting parameter for a first object; adjusting a main container of the first object based on the changed setting parameters, and determining basic data corresponding to the adjusted main container; the other containers in the first object are laid out based on the basic data corresponding to the main container; and forming a target object based on the other containers after layout and the main container after adjustment. In the embodiment of the invention, when the screen size of the first object is changed, the main container of the first object is adjusted through the obtained change setting parameters of the first object, and the basic data corresponding to the adjusted main container is determined, so that other containers in the first object are laid out through the basic data of the adjusted main container, and when the size of the automatic layout container is adjusted, other containers can be changed in a responsive manner by a user, so that the adaptation of different screen widths can be rapidly carried out, and the use experience of the user is improved.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be implemented in other sequences than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the description of "first", "second", etc. in this disclosure is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implying an indication of the number of technical features being indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be considered to be absent and not within the scope of protection claimed in the present invention.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Referring to FIG. 1, a schematic diagram of a product design system is shown in accordance with an embodiment of the present invention.
The product design system includes a processor 10 and a design interface 20.
The product design system is a one-stop online product design tool generated by team cooperation, and provides functions of online product design, prototype drawing production design, webpage development design, product interaction design, UI and UX design tools and the like so as to realize real-time cooperation of multiple people and quickly build an applied design system.
The product design system is loaded in an electronic device with an application program with a layout processing function, such as a mobile phone, a tablet, or a display with an interactive system. The embodiment mainly provides a responsive design scheme of automatic layout so as to meet the diversity requirements of users.
The process for realizing the layout processing method based on the product design system comprises the following steps:
the processor 10 obtains a modification setting parameter of a first object imported by a user based on the design interface 20; adjusting a main container of the first object based on the changed setting parameters, and determining basic data corresponding to the adjusted main container; the other containers in the first object are laid out based on the basic data corresponding to the main container; the target object is composed based on the other containers after layout and the main container after adjustment, and is displayed on the design interface 20.
It should be noted that there is one main container and at least one other container for each first object.
Wherein the other containers are arranged on the sub-layer.
In the embodiment of the invention, when the screen size of the first object is changed, the main container of the first object is adjusted through the obtained change setting parameters of the first object, and the basic data corresponding to the adjusted main container is determined, so that other containers in the first object are laid out through the basic data of the adjusted main container, and when the size of the automatic layout container is adjusted, other containers can be changed in a responsive manner by a user, so that the adaptation of different screen widths can be rapidly carried out, and the use experience of the user is improved.
Referring to fig. 2, a flow chart of a layout processing method according to an embodiment of the present invention is applied to a processor in the product design system, where the method includes:
step S201: a change setting parameter for the first object is obtained.
In the process of implementing step 201, when all configurations of the generated first object need to be changed to match the screen to be designed, the setting parameters of the container size, resolution, direction and the like related to the screen to be designed are received.
Wherein the first object is a finished product design already set in the product design system.
Other implementations exist based on the implementation of step S201 shown above.
Responding to the size, resolution and direction of a container of a screen to be designed selected by a user;
when a user imports a first object that has been designed, modification setting parameters generated based on the container size, resolution, and orientation are acquired.
Step S202: and adjusting the main container of the first object based on the changed setting parameters, and determining the basic data corresponding to the adjusted main container.
The basic parameters include a container parameter for indicating the width and height of the container, and other parameters including resolution, direction, and the like.
The main container is the container of the first object outermost part.
It should be noted that, the specific implementation step S202 adjusts the main container of the first object based on the setting parameter, and the process of determining the basic data corresponding to the adjusted main container includes:
step S11: a first layout setting mode of a main container of the first object is determined.
Alternatively, in practice of the first object creation, the user may directly set the layout manner of each container in the first object.
The first layout setting mode includes a setting mode of adapting, fixing, and the like.
In the specific implementation process of step S11, a container layout of the main container of the first object, that is, a first layout setting manner, is determined from the storage data corresponding to the first object.
Step S12: and adjusting the container size of the main container of the first object according to the first layout setting mode based on the change setting parameters.
It should be noted that, in the specific implementation process of step S12, the method includes the following steps:
step S21: and if the first layout setting mode is determined to be the adaptive layout, controlling the main container to carry out adaptive operation based on the container parameter of the changed setting parameter so as to adjust the container size of the main container of the first object.
In the process of implementing step S21, if the first layout setting mode is an adaptive layout, the container size of the main container will change along with the change of the container parameter in the changed setting parameters, that is, the container size of the main container is adjusted according to the adaptive setting mode to be consistent with the container parameter of the changed setting parameters.
Such as: the screen to be designed, i.e. the width W of the container parameter in the changing setting parameter is 93, the height H is 51, and both the width and the height set by the first layout setting mode of the main container are set to "fit". At this time, the processor controls the container size of the main container according to the first layout setting mode, as shown in fig. 3, to change along with the change of the container parameters.
Step S22: and if the first layout setting mode is determined to be the fixed layout, changing the container size of the main container according to the container parameters in the container parameters for changing the setting parameters.
In the specific implementation process of step S23, if the container setting method is fixed, the container size of the main container is changed according to the container parameter for changing the setting parameter.
Such as: the screen to be designed, i.e. the width W of the container parameter in the changed setting parameter is 93 and the height H is 51, sets both the width and the height of the first layout setting mode of the main container to be "fixed". The container size of the main container is changed only according to the container parameters changing the setting parameters, as shown in fig. 4.
Optionally, if the setting mode of the container is fixed, there is also an implementation mode, the size of the current container is not changed, so that the width and the height cannot be changed along with the change of other layers.
It should be noted that the container is disposed on the layer.
Alternatively, the width and height of the first layout setting mode may be different, in this embodiment of the present invention, the height H of the first layout setting mode of the main container may be an adaptive layout, and the width W may be set to a fixed layout; the first layout arrangement of the main container may also be arranged with a height H being a fixed layout and a width W being a use layout.
Step S13: and adjusting other parameters of the main container of the first object according to the change setting parameters.
In the specific implementation process of step S13, other parameters of the main container are changed according to other parameters in the change setting parameters.
Step S203: and carrying out layout on other containers in the first object based on the basic data corresponding to the main container.
It should be noted that, there are various real-time ways to implement the layout of the other containers in the first object based on the basic data corresponding to the main container in step S203.
The first real-time mode specifically comprises the following steps:
step S31: and determining the first position relation between the main container of the first object and other containers respectively.
In the specific implementation process of step S31, when the main container of the first object is not changed, determining a distance relationship between the coordinate positions of the main container and the coordinate positions of other containers according to the coordinate position of each container in the first object.
Step S32: and adjusting the layout of other containers based on the first position relation between the main container of the first object and other containers and the basic data corresponding to the main container respectively to obtain the target object.
In the specific implementation process of step S32, based on the first positional relationship between the main container of the first object and the other containers, and the basic data corresponding to the main container, determining the second positional relationship between the main container and the other containers. And adjusting the position coordinates of other containers based on the second position relation, so as to obtain the target object.
Optionally, the method further comprises: other parameters of the other containers are adjusted by other parameters of the main container.
The second real-time mode specifically comprises the following steps:
step S41: and determining the first position relation between the main container of the first object and other containers respectively.
Step S42: and determining the positions of other containers in the first object based on the first position relation between the main container of the first object and the other containers and the basic data corresponding to the main container.
In the specific implementation process of step S42, the second positional relationship between the main container and the other containers is determined through the first positional relationship between the main container of the first object and the other containers, and the basic data corresponding to the main container. And thus the location of each other container.
Step S43: for each other container, the layout of the other container, namely the container position, is adjusted according to the second layout setting mode of the other container based on the position of the other container.
It should be noted that, the process of implementing step S43 specifically includes the following steps:
step S51: and if the second layout setting mode is determined to be the adaptive layout, controlling the other containers to perform the adaptive operation based on the container parameters of the changed setting parameters so as to adjust the container sizes of the other containers of the first object.
It should be noted that the process of implementing step S51 is the same as the above-described process of implementing step S21, and reference may be made to each other.
Step S52: if the second layout setting mode is determined to be full layout, performing full operation on the other containers according to the size of the screen to be designed corresponding to the changed setting parameters so as to adjust the container sizes of the other containers of the first object;
in the specific implementation process of step S22, if the second layout setting mode is determined to be the full layout, the other containers are controlled to perform the full operation, so that the container sizes of the other containers are consistent with the container parameters of the changed setting parameters.
Such as: the screen to be designed, i.e. the width W of the container parameter in the changing setting parameter is 93, the height H is 51, and the width and the height of the second layout setting mode of other containers are set to be full. The size depends on the width and height values of the screen to be designed corresponding to the main container. When the setting is changed, the processor controls the other containers to be filled with the main container corresponding to the screen to be designed according to the second layout setting mode of the setting so as to adapt to the change of the main container, as shown in fig. 5.
Step S53: and if the second layout setting mode is determined to be the fixed layout, changing the container sizes of the other containers according to the container parameters in the container parameters for changing the setting parameters.
It should be noted that the process of implementing step S53 is the same as the above-described process of implementing step S22, and reference may be made to each other.
It should be noted that there may be a plurality of containers on one sub-layer.
Step S204: and forming a target object based on the other containers after layout and the main container after adjustment.
In the specific implementation process of step S204, the other containers after layout and the adjusted main container are packaged to obtain a target object.
In the embodiment of the invention, when the screen size of the first object is changed, the main container of the first object is adjusted through the obtained change setting parameters of the first object, and the basic data corresponding to the adjusted main container is determined, so that other containers in the first object are laid out through the basic data of the adjusted main container, and when the size of the automatic layout container is adjusted, other containers can be changed in a responsive manner by a user, so that the adaptation of different screen widths can be rapidly carried out, and the use experience of the user is improved.
Optionally, based on the layout processing method shown in the above embodiment of the present invention, correspondingly, the embodiment of the present invention also correspondingly discloses a flow chart of another layout processing method, as shown in fig. 6, where the method includes:
step S601: a first modification operation is received for a primary container in a first object.
Step S602: and responding to the first modification operation, adjusting the main container, and determining the basic data corresponding to the adjusted main container.
It should be noted that, in the specific implementation process of the specific implementation steps S601 to S602, after the first object that has been designed is imported into the product design system, the size of the main container may be adjusted by moving the operation point of the first modification operation on the main container, so as to determine the basic data corresponding to the adjusted main container.
It should be noted that, the process of determining the basic data corresponding to the adjusted main container is the same as the process of determining the basic data corresponding to the adjusted main container in the step S202, which can be referred to each other.
Step S603: and carrying out layout on other containers in the first object based on the basic data corresponding to the main container.
Step S604: and forming a target object based on the other containers after layout and the main container after adjustment.
It should be noted that the specific implementation procedures of step S603 to step S604 and the specific implementation procedures of step S203 to step S204 described above can be referred to each other.
In an embodiment of the invention, a first modification operation is received for a primary container in a first object. And responding to the first modification operation, and adjusting the main container to layout other containers in the first object through the adjusted basic data of the main container, so that when a user adjusts the size of the automatic layout container, the other containers can change in response, and the adaptation of different screen widths can be rapidly carried out, so that the use experience of the user is improved.
Optionally, the layout processing method shown based on the embodiment of the present invention further includes the following steps:
step S61: a first input operation is received for a button container in a first object.
In the process of implementing step S51, if there is a first input operation for changing the button container, the first input operation is received.
Step S62: and adjusting the basic data of the button container in response to the first input operation.
In the specific implementation process of step S62, the width of the button container is adjusted according to the original content field length of the button container and the change of the field length of the first input operation, so that the button width is adapted to change along with the change of the first width, and the position of the button container is changed.
For example, as shown in fig. 7, when the original content in the button container a is a field of "Hi-me is a button", the first input operation changes the content in the button container a to a field of "Hi-me may be particularly long" the button text; the difference between the original content field length and the field length of the first input operation adjusts the width of the button container. That is, as the text within the button container changes, the button width will also change as the length of the field changes.
It should be noted that the length of each field is fixed.
In an embodiment of the invention, a first input operation is received for a button container in a first object. And adjusting the basic data of the button container in response to the first input operation. When the size of the content is adjusted, the size of the container can automatically respond to the change of the field, the size of the container is not required to be manually adjusted, and the design efficiency is improved.
Based on the layout processing method shown in the above embodiment of the present invention, correspondingly, the embodiment of the present invention shows a schematic structural diagram of a layout processing device, as shown in fig. 8, where the device includes:
an acquiring unit 801 for acquiring a change setting parameter for a first object;
a processing unit 802, configured to adjust a main container of the first object based on the setting parameter, and determine basic data corresponding to the adjusted main container; the other containers in the first object are laid out based on the basic data corresponding to the main container; and forming a target object based on the other containers after layout and the main container after adjustment.
The specific principle and execution process of each unit in the layout processing device disclosed in the above embodiment of the present invention are the same as those of the layout processing method shown in the above embodiment of the present invention, and reference may be made to the corresponding parts in the layout processing method shown in the above embodiment of the present invention, which are not repeated here.
In the embodiment of the invention, when the screen size of the first object is changed, the main container of the first object is adjusted through the obtained change setting parameters of the first object, and the basic data corresponding to the adjusted main container is determined, so that other containers in the first object are laid out through the basic data of the adjusted main container, and when the size of the automatic layout container is adjusted, other containers can be changed in a responsive manner by a user, so that the adaptation of different screen widths can be rapidly carried out, and the use experience of the user is improved.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the processing unit 802 for determining the adjusted basic data corresponding to the main container is specifically configured to:
determining a first layout setting mode of a main container of the first object;
adjusting the container size of the main container of the first object according to a first layout setting mode based on the change setting parameters;
and adjusting other parameters of the main container of the first object according to the change setting parameters.
Optionally, based on the foregoing description of the embodiment of the present invention, the processing unit 802 is specifically configured to adjust a container size of the main container of the first object according to the first layout setting manner based on the modification setting parameter:
if the first layout setting mode is determined to be the adaptive layout, controlling the main container to perform adaptive operation based on the container parameters of the changed setting parameters so as to adjust the container size of the main container of the first object;
and if the first layout setting mode is determined to be the fixed layout, changing the container size of the main container according to the container parameters in the container parameters for changing the setting parameters.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the processing unit 802 that performs layout on other containers in the first object based on the basic data corresponding to the main container is specifically configured to:
determining first position relations between the main container of the first object and other containers respectively;
and adjusting the layout of other containers based on the first position relation between the main container of the first object and the other containers and the basic data corresponding to the main container.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the processing unit 802 that performs layout on other containers in the first object based on the basic data corresponding to the main container is specifically configured to:
determining first position relations between the main container of the first object and other containers respectively;
determining the positions of other containers in the first object based on the first position relation between the main container of the first object and the other containers and the basic data corresponding to the main container;
for each other container, adjusting the layout of the other container according to the second layout setting mode of the other container based on the position of the other container.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the processing unit 802 is configured to adjust the layout of the other container according to the second layout setting manner of the other container based on the position of the other container, and is specifically configured to:
controlling the other containers to perform adaptation operation based on the container parameters of the changed setting parameters to adjust the container sizes of the other containers of the first object if the second layout setting mode is determined to be the adaptation layout;
if the second layout setting mode is determined to be full layout, performing full operation on the other containers according to the size of the screen to be designed corresponding to the changed setting parameters so as to adjust the container sizes of the other containers of the first object;
and if the second layout setting mode is determined to be the fixed layout, changing the container sizes of the other containers according to the container parameters in the container parameters for changing the setting parameters.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the obtaining unit 801 is further configured to: receiving a first input operation for a button container in a first object;
correspondingly, the processing unit 802 is further configured to:
and adjusting the position of the button container in response to the first input operation.
Optionally, based on the layout processing device shown in the foregoing embodiment of the present invention, the obtaining unit 801 is further configured to:
a first modification operation is received for a primary container in a first object.
Correspondingly, the processing unit 802 is further configured to: and responding to the first modification operation, adjusting the main container, and determining the basic data corresponding to the adjusted main container.
The embodiment of the application also provides electronic equipment, which comprises: the device comprises a processor and a memory, wherein the processor and the memory are connected through a communication bus; the processor is used for calling and executing the program stored in the memory; the memory is used for storing a program for realizing the layout processing method.
The electronic device in the disclosed embodiments of the invention may include, but is not limited to, a stationary terminal such as a digital TV, desktop computer, or the like.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the data storage method shown in the flow chart.
Still further, an embodiment of the present invention also provides a computer storage medium, i.e., a computer-readable storage medium, storing computer-executable instructions for performing an analysis method of a version application.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving version basic information of a software application successfully online; acquiring a baseline code file of the software application based on the version basic information; analyzing the baseline code file to obtain a corresponding analysis result; an open source asset inventory is generated for subsequent user queries based on the analysis results, the name of the target component, and the software name of the version application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.