Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic after pint diagram node and diagram not able to edit (Read 4130 times)
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
after pint diagram node and diagram not able to edit
Mar 15th, 2021 at 6:09am
Print Post  
in my code when i click on print diagram after this not able to edit diagram and node.i tried setallowinplaceedit(true) but still not working.
Please let me know the way.
  

Diagram_Not_Edited1.png (Attachment deleted)
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: after pint diagram node and diagram not able to edit
Reply #1 - Mar 15th, 2021 at 6:47am
Print Post  
Please post the code your 'print diagram' button runs.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after pint diagram node and diagram not able to edit
Reply #2 - Mar 15th, 2021 at 7:11am
Print Post  
Added code,
  let boundary = document.getElementById("diagram") as HTMLCanvasElement;
        let mainTable = document.getElementById("maintable") as HTMLTableElement;
        let interfaces = document.getElementById("interface_details") as HTMLTableElement;
        let legends = document.getElementById("interface_details1") as HTMLTableElement;
        let lineTypes = document.getElementById("lineType") as HTMLCanvasElement;

        setTimeout(() => {
            let img = document.createElement("img");
            img.src = lineTypes.toDataURL();
            legends.rows[1].cells[0].children[1].innerHTML = '';
            legends.rows[1].cells[0].children[1].appendChild(img);

            let cellTable = mainTable.rows[0].cells[0] as HTMLTableCellElement
            cellTable.style.verticalAlign = 'top';
            interfaces.style.height = "" + legends.offsetHeight;
            let printWindow = window.open();

            printWindow.document.write("<img src = '" + boundary.toDataURL() + "'/>")
            printWindow.document.write("<div>" + mainTable.outerHTML + "</div>");
            //printWindow.document.getElementById("maintable").style.pageBreakBefore = 'always';
            //printWindow.document.getElementById("maintable").style.pageBreakInside = 'avoid';

            printWindow.document.addEventListener('load', () => {
                printWindow.focus();
                printWindow.print();
                printWindow.document.close();
                printWindow.close();
                this.changeDetector.detectChanges();
                document.getElementById("diagram").style.cursor='pointer';
            }, true);                     
        }, 500)
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: after pint diagram node and diagram not able to edit
Reply #3 - Mar 15th, 2021 at 7:44am
Print Post  
Our developer could not reproduce that. Please let us know what we should change in attached html to see that happen.
  

TestPrint.zip (Attachment deleted)
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after pint diagram node and diagram not able to edit
Reply #4 - Mar 15th, 2021 at 8:09am
Print Post  
after closing print window node text not edited and if i click on any other window or inspect it start showing cursor for edit
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: after pint diagram node and diagram not able to edit
Reply #5 - Mar 15th, 2021 at 9:33am
Print Post  
That's not happening in TestPrint.html above. Check if you aren't changing Z order from your print code or edit event handlers, say diagram canvas might have moved in front of edit control.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: after pint diagram node and diagram not able to edit
Reply #6 - Mar 15th, 2021 at 2:25pm
Print Post  
i have two canvas to print one is from other window and one is from current window. click on print cursor not showing for edit. if i comment code for any one canvas and    click on print  ,cursor starts showing for edit.
setTimeout(() => {
let printWindow = window.open();
// printWindow.document.write('<html><head><title>' + document.title + '</title>');
// printWindow.document.write('</head><body >');
// printWindow.document.write('<h1>' + document.title + '</h1>');
console.log(mainTable.outerHTML);
printWindow.document.write("<div><img src = '" + boundary.toDataURL() + "'/></div>")
printWindow.document.write("<div>" + mainTable.outerHTML + "</div>");
// printWindow.document.write('</body></html>');
printWindow.document.write("<div><img src = '" + lineTypes.toDataURL() + "'/></div>");


printWindow.document.addEventListener('load', () => {
printWindow.document.close();
// printWindow.focus(); ;
printWindow.print();
printWindow.close();
//divElement.innerHTML='';
}, true);
dialog.unloadComponent();
}, 600)
« Last Edit: Mar 16th, 2021 at 6:32am by reshma »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: after pint diagram node and diagram not able to edit
Reply #7 - Mar 16th, 2021 at 9:54am
Print Post  
We cannot help you unless you attach a test page reproducing that. You could use TestPrint.zip above as a start and add code from your main project until the problem shows. Feel free to send me a private message with your whole project if you can't reproduce that separately either.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint