fix inconsistent open-close braces, add warn when using element even when id provided

This commit is contained in:
Joe DF 2022-05-29 20:53:11 -04:00
parent 21146b6b2c
commit d4dfcd2288

View File

@ -59,6 +59,8 @@ $.Navigator = function( options ){
if( !options.element ){
if (!options.id) {
options.id = 'navigator-' + $.now();
}
this.element = $.makeNeutralElement( "div" );
options.controlOptions = {
anchor: $.ControlAnchor.TOP_RIGHT,
@ -94,6 +96,8 @@ $.Navigator = function( options ){
this.element.id = options.id;
} else {
this.element = options.element;
$.console.warn("Given option.id for Navigator was ignored since option.element was provided and is being used instead.");
options.controlOptions = {
anchor: $.ControlAnchor.NONE,
attachToViewer: false,