|
@@ -89,7 +89,7 @@ module.exports = function(theme) {
|
89
|
89
|
}
|
90
|
90
|
|
91
|
91
|
|
92
|
|
- if (type === 'label') {
|
|
92
|
+ if (type === 'label' && caption != 'None') {
|
93
|
93
|
var lines = [[]],
|
94
|
94
|
maxWidth = 0,
|
95
|
95
|
words = smartquotes(caption + "").trim().replace(/\s\s+/g, " \n").split(/ /g);
|
|
@@ -123,20 +123,20 @@ module.exports = function(theme) {
|
123
|
123
|
var totalHeight = lines.length * theme.labelLineHeight + (lines.length - 1) * theme.labelLineSpacing;
|
124
|
124
|
|
125
|
125
|
|
126
|
|
- var x = theme.labelAlign === "left" ? left : theme.labelAlign === "right" ? right : (left + right) / 2;
|
|
126
|
+ var x = theme.labelAlign === "left" ? labelLeft : theme.labelAlign === "right" ? labelRight : (labelLeft + labelRight) / 2;
|
127
|
127
|
|
128
|
128
|
|
129
|
129
|
var y;
|
130
|
130
|
|
131
|
|
- if (top !== null && bottom !== null) {
|
|
131
|
+ if (labelTop !== null && labelBottom !== null) {
|
132
|
132
|
|
133
|
|
- y = (bottom + top - totalHeight) / 2;
|
134
|
|
- } else if (bottom !== null) {
|
|
133
|
+ y = (labelBottom + labelTop - totalHeight) / 2;
|
|
134
|
+ } else if (labelBottom !== null) {
|
135
|
135
|
|
136
|
|
- y = bottom - totalHeight;
|
|
136
|
+ y = labelBottom - totalHeight;
|
137
|
137
|
} else {
|
138
|
138
|
|
139
|
|
- y = top;
|
|
139
|
+ y = labelTop;
|
140
|
140
|
}
|
141
|
141
|
|
142
|
142
|
|