src/snazzy-info-window.js
function mergeDefaultOptions(opts) {
    const copy = {};
    copyKeys(copy, _defaultOptions);
    copyKeys(copy, opts);
    Object.keys(_defaultOptions).forEach((key) => {
        const obj = _defaultOptions[key];
        if (typeof obj === 'object') {
            const objCopy = {};
            copyKeys(objCopy, obj);
            copyKeys(objCopy, copy[key]);
            copy[key] = objCopy;
        }
    });
    return copy;
}
function mergeDefaultOptions(opts) {
    const copy = {};
    copyKeys(copy, _defaultOptions);
    copyKeys(copy, opts);
    Object.keys(_defaultOptions).forEach((key) => {
        const obj = _defaultOptions[key];
        if (typeof obj === 'object') {
            const objCopy = {};
            copyKeys(objCopy, obj);
            copyKeys(objCopy, copy[key]);
            copy[key] = objCopy;
        }
    });
    return copy;
}
function mergeDefaultOptions ( opts ) { const copy = { } ; copyKeys ( copy , _defaultOptions ) ; copyKeys ( copy , opts ) ; Object . keys ( _defaultOptions ) . forEach ( ( key ) => { const obj = _defaultOptions [ key ] ; if ( typeof obj === 'object' ) { const objCopy = { } ; copyKeys ( objCopy , obj ) ; copyKeys ( objCopy , copy [ key ] ) ; copy [ key ] = objCopy ; } } ) ; return copy ; }
We need to safely merge options from the defaults. This will make sure settings like edgeOffset are properly assigned.
We need to safely merge options from the defaults . This will make sure settings like edgeOffset are properly assigned .