mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 06:51:10 +03:00
Merge pull request #4411 from mabashian/workflow-start-node-width
Makes workflow start node width dynamic to account for languages other than English Reviewed-by: Michael Abashian https://github.com/mabashian
This commit is contained in:
commit
481df40764
@ -23,9 +23,16 @@ export default ['moment', '$timeout', '$window', '$filter', 'TemplatesStrings',
|
||||
restrict: 'E',
|
||||
link: function(scope, element) {
|
||||
|
||||
// Quickly render the start text so we see how wide it is and know how wide to make the start
|
||||
// node element.
|
||||
const startNodeText = $(`<span class="WorkflowChart-node" style="visibility:hidden;"><span class="WorkflowChart-startText">${TemplatesStrings.get('workflow_maker.START')}</span></span>`);
|
||||
startNodeText.appendTo(document.body);
|
||||
const startNodeTextWidth = startNodeText.width();
|
||||
startNodeText.remove();
|
||||
|
||||
let nodeW = 180,
|
||||
nodeH = 60,
|
||||
rootW = 60,
|
||||
rootW = startNodeTextWidth + 25,
|
||||
rootH = 40,
|
||||
startNodeOffsetY = scope.mode === 'details' ? 17 : 10,
|
||||
maxNodeTextLength = 27,
|
||||
|
Loading…
Reference in New Issue
Block a user