Skip to content

Refactoring HTML anatomy of items in layers#530

Closed
Anshpreet8 wants to merge 1 commit into
Maps4HTML:mainfrom
Anshpreet8:refcatoringLayer
Closed

Refactoring HTML anatomy of items in layers#530
Anshpreet8 wants to merge 1 commit into
Maps4HTML:mainfrom
Anshpreet8:refcatoringLayer

Conversation

@Anshpreet8

@Anshpreet8 Anshpreet8 commented Oct 8, 2021

Copy link
Copy Markdown
Contributor

Used the svg "More Vert" icon instead of the details element to avoid having to nest interactive elements inside the summary element, as the suggested layout in the proposal for alternative layer item anatomy

Closes #263

@ahmadayubi

ahmadayubi commented Oct 8, 2021

Copy link
Copy Markdown
Member

Was there a reason for using SVG for icons rather than HTML Icons? In terms of lines of code using HTML icons would reduce SVG generation to a single line of code simply assigning the icon value.

An example of how HTML icons are used can be seen here:
https://github.com/Maps4HTML/Web-Map-Custom-Element/blob/14375f26c641a03c74cb798856d63a9c232caa27/src/mapml/control/ReloadButton.js#L10

@Anshpreet8 Anshpreet8 changed the title refactored the layer HTML anatomy to not include nested interactive e… Refactoring HTML anatomy of items in layers Oct 8, 2021
@Anshpreet8

Copy link
Copy Markdown
Contributor Author

Was there a reason for using SVG for icons rather than HTML Icons? In terms of lines of code using HTML icons would reduce SVG generation to a single line of code simply assigning the icon value.

An example of how HTML icons are used can be seen here:

https://github.com/Maps4HTML/Web-Map-Custom-Element/blob/14375f26c641a03c74cb798856d63a9c232caa27/src/mapml/control/ReloadButton.js#L10

The suggestion to use svg icons was made #263

@ahmadayubi

Copy link
Copy Markdown
Member

I get the following error in my console, in case you haven't come across this already, it's a present error in all the files I've checked so far:

errornew

@Anshpreet8 Anshpreet8 closed this Oct 8, 2021
@Anshpreet8
Anshpreet8 deleted the refcatoringLayer branch October 8, 2021 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTML anatomy of items in the layers list needs refactoring

2 participants