mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-22 19:13:35 +00:00
Add line sprite
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z `which glue` ]] ; then
|
||||
echo "You need to install glue."
|
||||
echo "http://glue.readthedocs.org/en/latest/installation.html"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAKIPATH=$1
|
||||
|
||||
if [[ -z $MAKIPATH ]]; then
|
||||
echo "Usage: makesprite PATHTOMAKI"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
dir=$(dirname $0)
|
||||
img="$dir/../img"
|
||||
css="$dir/../css"
|
||||
|
||||
glue --namespace=maki --sprite-namespace= $1/renders --css=$css --img=$img
|
||||
mv $css/renders.css $css/maki.css
|
||||
mv $img/renders.png $img/maki.png
|
||||
sed -i 's/renders/maki/' $css/maki.css
|
||||
36
img/source/makesprite
Executable file
36
img/source/makesprite
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z `which glue` ]] ; then
|
||||
echo "You need to install glue."
|
||||
echo "http://glue.readthedocs.org/en/latest/installation.html"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MAKIPATH=$1
|
||||
|
||||
if [[ -z $MAKIPATH ]]; then
|
||||
echo "Usage: makesprite PATHTOMAKI"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
dir=$(dirname $0)
|
||||
img="$dir/.."
|
||||
css="$dir/../../css"
|
||||
|
||||
cd $dir
|
||||
mkdir preset-icons
|
||||
|
||||
cp $MAKIPATH/renders/* preset-icons
|
||||
rm preset-icons/*-18.png
|
||||
rm preset-icons/*-12.png
|
||||
for x in preset-icons/*.png; do
|
||||
mv $x `echo $x | sed "s/-24//"`
|
||||
done
|
||||
cp renders/line-presets/* preset-icons
|
||||
|
||||
|
||||
glue --namespace=preset --sprite-namespace= preset-icons --css=$css --img=$img
|
||||
|
||||
rm preset-icons/*
|
||||
rmdir preset-icons
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel='stylesheet' href='css/reset.css'>
|
||||
<link rel='stylesheet' href='css/map.css'>
|
||||
<link rel='stylesheet' href='css/app.css'>
|
||||
<link rel='stylesheet' href='css/maki.css'>
|
||||
<link rel='stylesheet' href='css/preset-icons.css'>
|
||||
|
||||
<!-- mobile devices -->
|
||||
<meta name='viewport' content='initial-scale=1.0 maximum-scale=1.0'>
|
||||
|
||||
@@ -69,7 +69,7 @@ iD.ui.PresetGrid = function() {
|
||||
});
|
||||
|
||||
entered.append('div')
|
||||
.attr('class', function(d) { return 'maki-' + d.icon + '-24 icon'; });
|
||||
.attr('class', function(d) { return 'preset-' + d.icon + ' icon'; });
|
||||
|
||||
entered.append('span').attr('class','label').text(name);
|
||||
|
||||
|
||||
@@ -235,5 +235,17 @@
|
||||
"icon": "hospital",
|
||||
"form": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "River",
|
||||
"name": "river",
|
||||
"match": {
|
||||
"type": ["line"],
|
||||
"tags": {
|
||||
"waterway": "river"
|
||||
}
|
||||
},
|
||||
"icon": "waterway-river",
|
||||
"form": []
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user