material 0.9.7 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/card.js +2 -5
- package/src/menu.js +3 -1
- package/src/module/layout.js +9 -2
- package/src/view/build.js +1 -1
package/package.json
CHANGED
package/src/card.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Component,
|
|
3
|
-
display
|
|
4
|
-
position
|
|
3
|
+
display
|
|
5
4
|
} from '../'
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
console.log('position', position)
|
|
6
|
+
import position from './mixin/position'
|
|
10
7
|
|
|
11
8
|
class Card extends Component {
|
|
12
9
|
static defaults = {
|
package/src/menu.js
CHANGED
package/src/module/layout.js
CHANGED
|
@@ -10,12 +10,15 @@ import { is as isObject } from '../module/object'
|
|
|
10
10
|
* @returns {Object} The structure containing all created components.
|
|
11
11
|
*/
|
|
12
12
|
function create (schema, container, structure = {}, level = 0, components = []) {
|
|
13
|
-
// console.log('layout create')
|
|
14
13
|
level++
|
|
15
14
|
let component
|
|
16
15
|
const object = {}
|
|
17
16
|
const fragment = document.createDocumentFragment()
|
|
18
17
|
|
|
18
|
+
if (!Array.isArray(schema)) {
|
|
19
|
+
console.trace('Schema is not an array!')
|
|
20
|
+
}
|
|
21
|
+
|
|
19
22
|
for (let i = 0; i < schema.length; i++) {
|
|
20
23
|
var name
|
|
21
24
|
let options = {}
|
|
@@ -48,7 +51,11 @@ function create (schema, container, structure = {}, level = 0, components = [])
|
|
|
48
51
|
if (component.insert) component.insert(fragment)
|
|
49
52
|
else fragment.appendChild(element)
|
|
50
53
|
|
|
51
|
-
if (
|
|
54
|
+
if (container) {
|
|
55
|
+
// console.log('container', container)
|
|
56
|
+
component._container = container
|
|
57
|
+
if (component.onInserted) component.onInserted(container)
|
|
58
|
+
}
|
|
52
59
|
}
|
|
53
60
|
} else if (Array.isArray(schema[i])) {
|
|
54
61
|
if (!component) component = container
|