mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-47792 javascript: Fix for cropped headers and horizontal align
This commit is contained in:
parent
da0ef2e4cf
commit
301bc0f249
@ -8,9 +8,9 @@ function textrotate_make_svg(el)
|
||||
var abs=document.createElement('div');
|
||||
abs.appendChild(document.createTextNode(string));
|
||||
abs.style.position='absolute';
|
||||
el.parentNode.insertBefore(abs,el);
|
||||
var textWidth=abs.offsetWidth,textHeight=abs.offsetHeight;
|
||||
el.parentNode.removeChild(abs);
|
||||
document.body.appendChild(abs);
|
||||
var textWidth=abs.offsetWidth * 1.2,textHeight=abs.offsetHeight;
|
||||
document.body.removeChild(abs);
|
||||
|
||||
// Create SVG
|
||||
var svg=document.createElementNS(SVGNS,'svg');
|
||||
|
@ -8,9 +8,9 @@ function textrotate_make_svg(el)
|
||||
var abs=document.createElement('div');
|
||||
abs.appendChild(document.createTextNode(string));
|
||||
abs.style.position='absolute';
|
||||
el.parentNode.insertBefore(abs,el);
|
||||
var textWidth=abs.offsetWidth,textHeight=abs.offsetHeight;
|
||||
el.parentNode.removeChild(abs);
|
||||
document.body.appendChild(abs);
|
||||
var textWidth=abs.offsetWidth * 1.2,textHeight=abs.offsetHeight;
|
||||
document.body.removeChild(abs);
|
||||
|
||||
// Create SVG
|
||||
var svg=document.createElementNS(SVGNS,'svg');
|
||||
|
Loading…
x
Reference in New Issue
Block a user