minor error in Notespanel.js in webviewer 3.0.0 release

37 views
Skip to first unread message

prakhar jaiswal

unread,
Jul 12, 2017, 11:49:27 AM7/12/17
to PDFTron WebViewer
Hi,

Could we fix the below snippet in Notespanel.js:

 
$document.on('notesPanelVisibilityChanged', function(e, visible) {
                setVisibility
(visible);


               
if (visible) {
                    noteManager
.alignViews();
                    resize
();
               
} else {
                   
// makes sure that the bottom margin is correct when the panel is closed
                   
// as it may have been enlarged because of many notes
                    noteManager
.updateBottomMargin();
                    noteManager
.hideFocusConnector();
               
}
});

 the method invocation noteManager.updateBottomMargin(); requires to pass notes as argument.

As in it is not breaking the flow but is flooding the console with error and our error log repos:


ReaderControl.min.js:formatted:2352
Uncaught TypeError: Cannot read property 'length' of undefined


Thanks and regards

Justin Jung

unread,
Jul 12, 2017, 6:56:21 PM7/12/17
to PDFTron WebViewer on behalf of prakhar jaiswal
We have trouble reproducing the issue. Can you provide us steps to reproduce it?
As we check note panel visibility before checking the length of notes, it normally doesn't hit that if condition.

Justin Jung
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages