How can I drawing by order
See original GitHub issueI want to create a drawing project But It order by vue code
<v-stage
ref="stage"
:config="stageSize"
@mousemove="move"
@touchmove="handleMouseMove"
@mouseDown="handleMouseDown"
@touchstart="handleMouseDown"
@mouseUp="handleMouseUp"
@touchend="handleMouseUp"
>
<v-layer ref="layer">
<v-image
:config="{ image: image, draggable: true, centeredScaling: true }"
/>
<v-image :config="{ image: image2, draggable: true }" />
<v-rect
v-for="(rec, recIndex) in recs"
:key="`recIndex_${recIndex}`"
:config="{
x: Math.min(rec.startPointX, rec.startPointX + rec.width),
y: Math.min(rec.startPointY, rec.startPointY + rec.height),
width: Math.abs(rec.width),
height: Math.abs(rec.height),
fill: 'rgb(0,0,0,0)',
stroke: 'black',
strokeWidth: 3,
}"
/>
<v-text
ref="text"
:config="{
x: 10,
y: 10,
fontSize: 20,
text: text,
fill: 'black',
}"
/>
<v-line
v-for="(line, lineIndex) in lines"
:key="`lineIndex_${lineIndex}`"
:config="{
stroke: line.color,
strokeWidth: line.width,
globalCompositeOperation: line.globalCompositeOperation,
lineCap: 'round',
points: line.points,
}"
></v-line>
</v-layer>
</v-stage>
My step is
- draw red line
- draw square
- draw pink line
I want canvas render by drawing order, Is square up than red line I didn’t use z-index because that all change z-index but I just want after brush move up
can anyone help me ? thank
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Custom Order Drawing - Etsy
Check out our custom order drawing selection for the very best in unique or custom, handmade pieces from our prints shops.
Read more >How to get an order of portrait sketches - Quora
Start with a light sketch. · Start with a light outline. · Add shadows and smudge them. · To make your sketch look...
Read more >Draw Order in AutoCAD – DDSCAD | Digital Drafting Systems
The “Draw Order” tools in AutoCAD allow us to display objects behind or in front of other objects properly.
Read more >Order of Draw for Phlebotomy & Study Guide
When we speak of “order of draw” what exactly are we talking about? In phlebotomy, this term has special meaning as it is...
Read more >Order of Draw - Express Lab
Order of Draw ... To avoid cross-contamination, blood must be drawn and collected in tubes in a specific order. This is known as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In your data you should NOT have separate variables
recs
andlines
and probably others. You just need to have one array. Likeitems
orelements
or anything you want. Then every item in that array should havetype
property. Type can berectangle
,line
or any other type of drawing you want to have. Then on your template you will need to have just one loop over this one arrayThen you will have to define
element-component
. Where it will draw itself based ontype
attribute. Type isrectangle
then you usev-rect
for it. Type isline
you usev-line
for it and so on.I coding whole and it can be work , didn’t have error. thanks very much!!