mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
637fa05109
Created dynamic palette displaying currently used colors. This palette is now selected by default. New service UsedColorsService created. Listens to PISKEL_RESET and TOOL_RELEASED and keeps track of the list of current colors. Still need to : - improve sorting of colors - allow to clone the current color palette as a custom palette - add proper getter in UsedColorService to get the list of current colors Also I hardcoded a max-height for the palettes-list as I found no better way of handling the case of palettes containing many colors. Maybe should add a limit to the number of colors handled by this automatic palette.
20 lines
753 B
HTML
20 lines
753 B
HTML
<div class="toolbox-container palettes-list-container">
|
|
<h3 class="toolbox-title palettes-title" style="overflow:hidden">
|
|
<span style="line-height:24px ">Palettes</span>
|
|
<select class="palettes-list-select">
|
|
<option value="__current-colors">Current colors</option>
|
|
<option value="__manage-palettes">Create custom palettes</option>
|
|
<optgroup class="palettes-list-select-group" label="Custom palettes">
|
|
</optgroup>
|
|
</select>
|
|
</h3>
|
|
<div class="palettes-list-colors"></div>
|
|
<script type="text/template" id="palette-color-template">
|
|
<div class="palettes-list-color" data-color="{{color}}" title="{{color}}">
|
|
<div data-color="{{color}}" style="background:{{color}}"></div>
|
|
</div>
|
|
</script>
|
|
</div>
|
|
|
|
|