mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-26 03:24:59 +02:00
schhist/schhist2web: correctly align shared columns
When sharing columns, the "unchanged" bar wasn't centered unless the sheet was the first sheet in that column.
This commit is contained in:
parent
cc5732bbf3
commit
d8f5c95ecb
@ -385,6 +385,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
next="$head"
|
next="$head"
|
||||||
|
td=false
|
||||||
for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
||||||
[ -d "$cache/$n/ppm0" ] || continue
|
[ -d "$cache/$n/ppm0" ] || continue
|
||||||
empty=true
|
empty=true
|
||||||
@ -406,34 +407,37 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
|||||||
pdf="$out/$next/pdf/$m.pdf"
|
pdf="$out/$next/pdf/$m.pdf"
|
||||||
|
|
||||||
if [ "${order%%=$m[:=]*}" = "$order" ]; then
|
if [ "${order%%=$m[:=]*}" = "$order" ]; then
|
||||||
|
$td && s="$s<TD>"
|
||||||
td=true
|
td=true
|
||||||
else
|
|
||||||
td=false
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$a0" -a -f "$b0" ]; then
|
if [ -f "$a0" -a -f "$b0" ]; then
|
||||||
$td && s="$s<TD align=\"center\" valign=\"middle\">"
|
|
||||||
if ! pngdiff cat "$diff" "$a1" "$b1" "$a0" "$b0"; then
|
if ! pngdiff cat "$diff" "$a1" "$b1" "$a0" "$b0"; then
|
||||||
|
$td && s="$s<TD align=\"center\" valign=\"middle\">"
|
||||||
|
td=false
|
||||||
s="$s<IMG src=\"unchanged.png\">"
|
s="$s<IMG src=\"unchanged.png\">"
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
$td && s="$s<TD>"
|
||||||
|
td=false
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS "$a2" "$b2" "$a0" "$b0" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS "$a2" "$b2" "$a0" "$b0" ||
|
||||||
exit
|
exit
|
||||||
schps2pdf -T BEFORE -T AFTER -o "$pdf" "$aps" "$bps" || exit
|
schps2pdf -T BEFORE -T AFTER -o "$pdf" "$aps" "$bps" || exit
|
||||||
elif [ -f "$a0" ]; then
|
elif [ -f "$a0" ]; then
|
||||||
$td && s="$s<TD>"
|
$td && s="$s<TD>"
|
||||||
|
td=false
|
||||||
pngdiff cat "$diff" -f -c 1,0,0 "$a1" "$a1" || exit
|
pngdiff cat "$diff" -f -c 1,0,0 "$a1" "$a1" || exit
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 1,0,0 "$a2" "$a2" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 1,0,0 "$a2" "$a2" ||
|
||||||
exit
|
exit
|
||||||
schps2pdf -T DELETED -o "$pdf" "$aps" || exit
|
schps2pdf -T DELETED -o "$pdf" "$aps" || exit
|
||||||
elif [ -f "$b0" ]; then
|
elif [ -f "$b0" ]; then
|
||||||
$td && s="$s<TD>"
|
$td && s="$s<TD>"
|
||||||
|
td=false
|
||||||
pngdiff cat "$diff" -f -c 0,1,0 "$b1" "$b1" || exit
|
pngdiff cat "$diff" -f -c 0,1,0 "$b1" "$b1" || exit
|
||||||
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$b2" "$b2" ||
|
pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$b2" "$b2" ||
|
||||||
exit
|
exit
|
||||||
schps2pdf -T NEW -o "$pdf" "$bps" || exit
|
schps2pdf -T NEW -o "$pdf" "$bps" || exit
|
||||||
else
|
else
|
||||||
$td && s="$s<TD>"
|
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "$s"
|
echo "$s"
|
||||||
@ -441,6 +445,7 @@ for n in `cd "$dir" && git rev-list $first..HEAD~1` $first; do
|
|||||||
wrapped_png "$out" "$next" "$m"
|
wrapped_png "$out" "$next" "$m"
|
||||||
empty=false
|
empty=false
|
||||||
done < <(ordered_names)
|
done < <(ordered_names)
|
||||||
|
$td && echo "<TD>"
|
||||||
if ! $empty; then
|
if ! $empty; then
|
||||||
echo "$s<TD valign=\"middle\">"
|
echo "$s<TD valign=\"middle\">"
|
||||||
commit_entry "$dir" $next
|
commit_entry "$dir" $next
|
||||||
|
Loading…
Reference in New Issue
Block a user