Making quotes around literals lighter

This commit is contained in:
Jeff Avallone 2014-12-14 22:17:59 -05:00
parent 10d5e7f534
commit 66d9b97a6f
3 changed files with 12 additions and 5 deletions

View File

@ -75,6 +75,10 @@
fill: transparent;
}
.quote {
fill: #a0a0a0;
}
.placeholder text {
fill: #fff;
font-weight: bold;

View File

@ -48,9 +48,7 @@ export default {
group = this.container.group()
.addClass('label'),
rect = group.rect(),
text = group.text().attr({
text: text
});
text = group.text(0, 0, text);
setTimeout(deferred.resolve.bind(deferred, group));
deferred.promise.then(() => {
@ -58,7 +56,7 @@ export default {
margin = 5;
text.transform(Snap.matrix()
.translate(margin, box.height + margin));
.translate(margin, box.height / 2 + 2 * margin));
rect.attr({
width: box.width + 2 * margin,

View File

@ -5,8 +5,13 @@ export default _.extend({}, Base, {
type: 'literal',
_render() {
return this.renderLabel('"' + this.literal.textValue + '"')
return this.renderLabel(['"', this.literal.textValue, '"'])
.then(label => {
var spans = label.selectAll('tspan');
spans[0].addClass('quote');
spans[2].addClass('quote');
label.select('rect').attr({
rx: 3,
ry: 3