Commit bda80984 authored by Robin Tissot's avatar Robin Tissot
Browse files

Fixes rtl in visualisation panel & align short rtl line imgs to the right in transcription modal.

parent c5ab97f0
......@@ -297,6 +297,14 @@ export default Vue.extend({
let top = -(bbox.top*ratio - context);
let left = -(bbox.left*ratio - context);
// if text direction is rtl and the line doesn't take all the space,
// align it to the right
if (modalImgContainer.clientWidth - 2*context > bbox.width*ratio
&& this.$store.state.document.defaultTextDirection == 'rtl') {
left += modalImgContainer.clientWidth - 2*context - bbox.width*ratio;
}
// modalImgContainer.style.transform = 'scale('+ratio+')';
let imgWidth = this.$store.state.parts.image.size[0]*ratio +'px';
......
......@@ -10,7 +10,7 @@
fill="none"
v-bind:stroke="pathStrokeColor"
v-bind:d="baselinePoints"></path>
<text :text-anchor="'end' ? $store.state.document.defaultTextDirection : ''"
<text :text-anchor="$store.state.document.defaultTextDirection == 'rtl' ? 'end' : ''"
ref="textElement"
lengthAdjust="spacingAndGlyphs">
<textPath v-bind:href="'#' + textPathId"
......@@ -121,4 +121,4 @@ export default Vue.extend({
</script>
<style scoped>
</style>
\ No newline at end of file
</style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment