A
A
Anton2020-10-01 10:13:07
Frameworks
Anton, 2020-10-01 10:13:07

Which vue ui framework to choose for working with svg sprites?

Good afternoon!
I need to write a SPA web application (single page site).
The question is that there it will be necessary to draw a map on which there will be buildings and these buildings need to be changed.

That is, for example, 10 identical buildings, each of them has a parameter (type: building1 or building2)
If the parameter is "building1" you need to show one picture, if "building2" then another.

Before that, I made a similar mechanism on vue + vuetify, there was an svg map on which 10 identical buildings of the "building1" type were placed, and along with them on the same map 10 identical buildings of the "building2" type, then I cut out the code of each building, put it in component and then, depending on the conditions, loaded different types of buildings (svg images).

And the question is how do I not bother with each building separately, since in fact there are 10 identical 2d models of buildings in svg, but I manually cut each of them and put them into a separate component, so that later I could dynamically change, because when needed make 90 buildings and each have 5 different types, it turns into hell.
I just want to take one model of buildings and scatter them, for example, along coordinates, and then just substitute different models in these coordinates, but I haven’t googled how to do this yet =(

Please tell me, maybe there is some kind of framework that is suitable, or a subtlety that I don’t understand .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2020-10-01
@Fragster

Vue components can be chunks of inline svg that sit right inside a large inline-svg component. No "ui frameworks" are needed here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question