This repository has been archived by the owner on Feb 11, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Allow directives to be passed as node's config - Fix map() method issue related to mapping numbers and objects
- Loading branch information
Showing
17 changed files
with
402 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/*! | ||
* @isotope/core v0.1.3 | ||
* @isotope/core v0.1.4 | ||
* (c) Arek Nawo <[email protected]> (areknawo.com) | ||
* Released under the MIT License. | ||
*/ | ||
|
@@ -24,7 +24,7 @@ | |
if (typeof config === "string") { | ||
this.element.textContent = config; | ||
} | ||
else if (config) { | ||
else if (typeof config === "object" && !Array.isArray(config)) { | ||
if (config.attach) { | ||
this.childIndex = 0; | ||
} | ||
|
@@ -41,6 +41,9 @@ | |
callback(this, config); | ||
}); | ||
} | ||
else if (config) { | ||
this.$(config); | ||
} | ||
this.process(); | ||
} | ||
/** | ||
|
@@ -245,7 +248,7 @@ | |
*/ | ||
getElement(element, config) { | ||
if (typeof element === "string") { | ||
if (typeof config === "object" && config.namespace) { | ||
if (typeof config === "object" && !Array.isArray(config) && config.namespace) { | ||
if (this.customDOM) { | ||
return this.customDOM.createElement(element, config.namespace); | ||
} | ||
|
@@ -765,10 +768,11 @@ | |
*/ | ||
const fill = ({ changes, targetInput }) => { | ||
changes.forEach((change) => { | ||
const { id, type } = change; | ||
const id = `${change.id}`; | ||
const { type } = change; | ||
if (type === "add" || type === "move") { | ||
const index = targetInput.findIndex((item) => { | ||
return typeof item === "object" ? item.id === id : item === id; | ||
return typeof item === "object" ? `${item.id}` === id : `${item}` === id; | ||
}); | ||
if (type === "add") { | ||
change.item = targetInput[index]; | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.