Skip to content

Commit 4c80c8f

Browse files
author
Alessio Maffeis
committed
Add 21px limit to font-size
1 parent 6971655 commit 4c80c8f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

PictureInput.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</canvas>
2020
<div v-if="!imageSelected && !plain"
2121
class="picture-inner"
22-
:style="{top: -previewHeight + 'px', marginBottom: -previewHeight + 'px', fontSize: 0.04 * previewWidth + 'px', borderRadius: radius + '%'}">
22+
:style="{top: -previewHeight + 'px', marginBottom: -previewHeight + 'px', fontSize: fontSize, borderRadius: radius + '%'}">
2323
<span v-if="supportsDragAndDrop" class="picture-inner-text" v-html="strings.drag"></span>
2424
<span v-else class="picture-inner-text" v-html="strings.tap"></span>
2525
</div>
@@ -474,6 +474,9 @@ export default {
474474
const classObject = {}
475475
classObject['dragging-over'] = this.draggingOver
476476
return classObject
477+
},
478+
fontSize () {
479+
return Math.min(0.04 * this.previewWidth, 21) + 'px'
477480
}
478481
}
479482
}

0 commit comments

Comments
 (0)