mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-19 04:57:51 +00:00
Removing bugs
This commit is contained in:
parent
894b7904c3
commit
c951a405af
@ -36,8 +36,13 @@ export class TextAddingTool {
|
||||
document.body.style.cursor = "text";
|
||||
|
||||
this.temporaryElement.addEventListener("focusout", () => {
|
||||
let savedText = this.temporaryElement.innerText;
|
||||
this.addingFinished.emit(new TextAddedDataEvent(savedText, event.clientX, event.clientY));
|
||||
let innerText = this.temporaryElement.innerText;
|
||||
let splittedText = innerText.split(/\r?\n/);
|
||||
if (splittedText[splittedText[length-1]] === ""){
|
||||
innerText.slice(0, -1);
|
||||
}
|
||||
|
||||
this.addingFinished.emit(new TextAddedDataEvent(innerText, event.clientX, event.clientY));
|
||||
|
||||
this.drawingEventSource.textSaved.subscribe((evt:boolean) => {
|
||||
if(evt){
|
||||
|
@ -62,8 +62,13 @@ export class TextEditingTool {
|
||||
this.temporaryElement.innerText = elem.text;
|
||||
|
||||
this.temporaryElement.addEventListener("focusout", () => {
|
||||
let savedText = this.temporaryElement.innerText;
|
||||
this.editingFinished.emit(new TextEditedDataEvent(this.editingDrawingId, savedText, this.editedElement));
|
||||
let innerText = this.temporaryElement.innerText;
|
||||
let splittedText = innerText.split(/\r?\n/);
|
||||
if (splittedText[splittedText[length-1]] === ""){
|
||||
innerText.slice(0, -1);
|
||||
}
|
||||
|
||||
this.editingFinished.emit(new TextEditedDataEvent(this.editingDrawingId, innerText, this.editedElement));
|
||||
|
||||
this.drawingEventSource.textSaved.subscribe((evt:boolean) => {
|
||||
if(evt){
|
||||
|
@ -16,13 +16,9 @@ a.table-link {
|
||||
color: white!important;
|
||||
}
|
||||
|
||||
.temporaryElement{
|
||||
margin-top: -10px;
|
||||
}
|
||||
|
||||
@-moz-document url-prefix() {
|
||||
.temporaryElement{
|
||||
margin-top: -11px;
|
||||
line-height: 1.4em;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user