Revize fe611231
Přidáno uživatelem Pavel Fidranský před více než 6 roky(ů)
sources/src/main/webapp/css/main.css | ||
---|---|---|
449 | 449 |
} |
450 | 450 |
|
451 | 451 |
.viewport .group .group-name { |
452 |
display: inline-block; |
|
453 |
white-space: nowrap; |
|
454 |
width: 100%; |
|
455 |
overflow: hidden; |
|
456 |
text-overflow: ellipsis; |
|
452 | 457 |
cursor: text; |
453 | 458 |
} |
454 | 459 |
|
... | ... | |
607 | 612 |
} |
608 | 613 |
|
609 | 614 |
.sidebar .group-name { |
610 |
position: absolute; |
|
611 |
top: 0; |
|
612 |
left: 70px; |
|
613 |
font-size: 1.2em; |
|
615 |
position: absolute; |
|
616 |
top: 0; |
|
617 |
left: 70px; |
|
618 |
width: 230px; |
|
619 |
font-size: 1.2em; |
|
614 | 620 |
line-height: 1.6rem; |
621 |
white-space: nowrap; |
|
622 |
width: 100%; |
|
623 |
overflow: hidden; |
|
624 |
text-overflow: ellipsis; |
|
615 | 625 |
cursor: text; |
616 | 626 |
} |
617 | 627 |
|
sources/src/main/webapp/js/components/group.js | ||
---|---|---|
510 | 510 |
})); |
511 | 511 |
|
512 | 512 |
// name |
513 |
var nameText = app.utils.createSvgElement('text', {
|
|
513 |
var nameTextInner = app.dom.createHtmlElement('span', {
|
|
514 | 514 |
'class': 'group-name', |
515 |
'x': 5, |
|
516 |
'y': 15, |
|
517 | 515 |
}); |
518 |
nameText.appendChild(document.createTextNode(this.name)); |
|
516 |
nameTextInner.appendChild(app.dom.createTextElement(this.name)); |
|
517 |
|
|
518 |
var nameText = app.utils.createSvgElement('foreignObject', { |
|
519 |
'x': 4, |
|
520 |
'y': 4, |
|
521 |
'width': 46, |
|
522 |
'height': 16, |
|
523 |
}); |
|
524 |
nameText.appendChild(nameTextInner); |
|
519 | 525 |
nameText.addEventListener('click', nameClick.bind(this)); |
520 | 526 |
rootElement.appendChild(nameText); |
521 | 527 |
|
... | ... | |
535 | 541 |
dissolveButton.appendChild(app.utils.createSvgElement('rect', { |
536 | 542 |
'rx': 4, |
537 | 543 |
'ry': 4, |
538 |
'x': 52,
|
|
544 |
'x': 54,
|
|
539 | 545 |
'y': 4, |
540 | 546 |
'height': 14, |
541 | 547 |
'width': 14, |
542 | 548 |
})); |
543 | 549 |
dissolveButton.appendChild(app.utils.createSvgElement('line', { |
544 |
'x1': 55,
|
|
550 |
'x1': 57,
|
|
545 | 551 |
'y1': 7, |
546 |
'x2': 63,
|
|
552 |
'x2': 65,
|
|
547 | 553 |
'y2': 15, |
548 | 554 |
})); |
549 | 555 |
dissolveButton.appendChild(app.utils.createSvgElement('line', { |
550 |
'x1': 63,
|
|
556 |
'x1': 65,
|
|
551 | 557 |
'y1': 7, |
552 |
'x2': 55,
|
|
558 |
'x2': 57,
|
|
553 | 559 |
'y2': 15, |
554 | 560 |
})); |
555 | 561 |
dissolveButton.addEventListener('click', dissolveClick.bind(this)); |
... | ... | |
731 | 737 |
if (newValue !== null) { |
732 | 738 |
this.name = newValue; |
733 | 739 |
|
734 |
rootElement.querySelector('.group-name').textContent = this.name;
|
|
740 |
rootElement.querySelector('.group-name').innerText = this.name;
|
|
735 | 741 |
} |
736 | 742 |
} |
737 | 743 |
|
Také k dispozici: Unified diff
fixed Group name not to overflow its container