Merge branch 'master' into dtt-c-render
This commit is contained in:
@@ -23,11 +23,14 @@ advdef = "advdef"
|
|||||||
|
|
||||||
def check_programs(level):
|
def check_programs(level):
|
||||||
path = os.environ.get("PATH").split(os.pathsep)
|
path = os.environ.get("PATH").split(os.pathsep)
|
||||||
|
|
||||||
|
def exists_in_path(prog):
|
||||||
|
result = filter(lambda x: os.path.exists(os.path.join(x, prog)), path)
|
||||||
|
return len(result) != 0
|
||||||
|
|
||||||
for prog,l in [(pngcrush,1), (optipng,2), (advdef,2)]:
|
for prog,l in [(pngcrush,1), (optipng,2), (advdef,2)]:
|
||||||
if l <= level:
|
if l <= level:
|
||||||
result = filter(lambda x: os.path.exists(os.path.join(x, prog)), path)
|
if (not exists_in_path(prog)) or (not exists_in_path(prog + ".exe")):
|
||||||
if len(result) == 0:
|
|
||||||
raise Exception("Optimization prog %s for level %d not found!" % (prog, l))
|
raise Exception("Optimization prog %s for level %d not found!" % (prog, l))
|
||||||
|
|
||||||
def optimize_image(imgpath, imgformat, optimizeimg):
|
def optimize_image(imgpath, imgformat, optimizeimg):
|
||||||
|
|||||||
@@ -160,7 +160,12 @@ function initMarkers() {
|
|||||||
if (markersInit) { return; }
|
if (markersInit) { return; }
|
||||||
|
|
||||||
markersInit = true;
|
markersInit = true;
|
||||||
|
|
||||||
|
// first, give all collections an empty array to work with
|
||||||
|
for (i in signGroups) {
|
||||||
|
markerCollection[signGroups[i].label] = [];
|
||||||
|
}
|
||||||
|
|
||||||
for (i in markerData) {
|
for (i in markerData) {
|
||||||
var item = markerData[i];
|
var item = markerData[i];
|
||||||
|
|
||||||
@@ -202,11 +207,8 @@ function initMarkers() {
|
|||||||
icon: iconURL,
|
icon: iconURL,
|
||||||
visible: false
|
visible: false
|
||||||
});
|
});
|
||||||
if (markerCollection[label]) {
|
|
||||||
markerCollection[label].push(marker);
|
markerCollection[label].push(marker);
|
||||||
} else {
|
|
||||||
markerCollection[label] = [marker];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (item.type == 'sign') {
|
if (item.type == 'sign') {
|
||||||
prepareSignMarker(marker, item);
|
prepareSignMarker(marker, item);
|
||||||
|
|||||||
Reference in New Issue
Block a user