mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-21 20:56:09 +03:00
Merge branch 'master' of github.com:openseadragon/openseadragon
This commit is contained in:
commit
38bc89f455
@ -1101,8 +1101,13 @@ function OpenSeadragon( options ){
|
|||||||
if ( options !== null || options !== undefined ) {
|
if ( options !== null || options !== undefined ) {
|
||||||
// Extend the base object
|
// Extend the base object
|
||||||
for ( name in options ) {
|
for ( name in options ) {
|
||||||
src = target[ name ];
|
var descriptor = Object.getOwnPropertyDescriptor(options, name);
|
||||||
copy = options[ name ];
|
if (descriptor.get || descriptor.set) {
|
||||||
|
Object.defineProperty(target, name, descriptor);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
copy = descriptor.value;
|
||||||
|
|
||||||
// Prevent never-ending loop
|
// Prevent never-ending loop
|
||||||
if ( target === copy ) {
|
if ( target === copy ) {
|
||||||
@ -1111,6 +1116,8 @@ function OpenSeadragon( options ){
|
|||||||
|
|
||||||
// Recurse if we're merging plain objects or arrays
|
// Recurse if we're merging plain objects or arrays
|
||||||
if ( deep && copy && ( OpenSeadragon.isPlainObject( copy ) || ( copyIsArray = OpenSeadragon.isArray( copy ) ) ) ) {
|
if ( deep && copy && ( OpenSeadragon.isPlainObject( copy ) || ( copyIsArray = OpenSeadragon.isArray( copy ) ) ) ) {
|
||||||
|
src = target[ name ];
|
||||||
|
|
||||||
if ( copyIsArray ) {
|
if ( copyIsArray ) {
|
||||||
copyIsArray = false;
|
copyIsArray = false;
|
||||||
clone = src && OpenSeadragon.isArray( src ) ? src : [];
|
clone = src && OpenSeadragon.isArray( src ) ? src : [];
|
||||||
|
Loading…
Reference in New Issue
Block a user