Skip to content
Snippets Groups Projects
Commit 084810c3 authored by Ron Lucke's avatar Ron Lucke
Browse files

Courseware: Leinwand Block

Closes #2867

Merge request studip/studip!3318
parent a658d710
No related branches found
No related tags found
No related merge requests found
......@@ -579,8 +579,10 @@ export default {
let input = this.$refs.textInputField;
input.value = '';
input.style.position = 'absolute';
input.style.top = this.$refs.canvas.offsetTop + y + 'px';
input.style.left = 320 + x + 'px';
const maxBottom = this.$refs.canvas.offsetTop + this.$refs.canvas.offsetHeight - 100;
input.style.top = y < maxBottom ? this.$refs.canvas.offsetTop + y + 'px' : maxBottom + 'px';
const leftMax = this.$refs.canvas.offsetLeft + this.$refs.canvas.offsetWidth - 320;
input.style.left = x < leftMax ? x + 'px' : leftMax + 'px';
input.style.lineHeight = fontsize + 'px';
input.style.fontSize = fontsize + 'px';
input.style.width = '300px';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment