Making quotes around literals lighter
This commit is contained in:
parent
10d5e7f534
commit
66d9b97a6f
@ -75,6 +75,10 @@
|
|||||||
fill: transparent;
|
fill: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.quote {
|
||||||
|
fill: #a0a0a0;
|
||||||
|
}
|
||||||
|
|
||||||
.placeholder text {
|
.placeholder text {
|
||||||
fill: #fff;
|
fill: #fff;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -48,9 +48,7 @@ export default {
|
|||||||
group = this.container.group()
|
group = this.container.group()
|
||||||
.addClass('label'),
|
.addClass('label'),
|
||||||
rect = group.rect(),
|
rect = group.rect(),
|
||||||
text = group.text().attr({
|
text = group.text(0, 0, text);
|
||||||
text: text
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(deferred.resolve.bind(deferred, group));
|
setTimeout(deferred.resolve.bind(deferred, group));
|
||||||
deferred.promise.then(() => {
|
deferred.promise.then(() => {
|
||||||
@ -58,7 +56,7 @@ export default {
|
|||||||
margin = 5;
|
margin = 5;
|
||||||
|
|
||||||
text.transform(Snap.matrix()
|
text.transform(Snap.matrix()
|
||||||
.translate(margin, box.height + margin));
|
.translate(margin, box.height / 2 + 2 * margin));
|
||||||
|
|
||||||
rect.attr({
|
rect.attr({
|
||||||
width: box.width + 2 * margin,
|
width: box.width + 2 * margin,
|
||||||
|
@ -5,8 +5,13 @@ export default _.extend({}, Base, {
|
|||||||
type: 'literal',
|
type: 'literal',
|
||||||
|
|
||||||
_render() {
|
_render() {
|
||||||
return this.renderLabel('"' + this.literal.textValue + '"')
|
return this.renderLabel(['"', this.literal.textValue, '"'])
|
||||||
.then(label => {
|
.then(label => {
|
||||||
|
var spans = label.selectAll('tspan');
|
||||||
|
|
||||||
|
spans[0].addClass('quote');
|
||||||
|
spans[2].addClass('quote');
|
||||||
|
|
||||||
label.select('rect').attr({
|
label.select('rect').attr({
|
||||||
rx: 3,
|
rx: 3,
|
||||||
ry: 3
|
ry: 3
|
||||||
|
Loading…
Reference in New Issue
Block a user