Skip to content

Commit 3b344ea

Browse files
committed
fix responsive predefined layouts example
1 parent d040da4 commit 3b344ea

File tree

2 files changed

+3
-42
lines changed

2 files changed

+3
-42
lines changed

examples/08-responsive-predefined-layouts.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!--<link rel="stylesheet" href="../dist/vue-grid-layout.css">-->
99
</head>
1010
<body>
11-
<h1>Vue Grid Layout Example 6 - Responsive</h1>
11+
<h1>Vue Grid Layout Example 8 - Responsive with predefined layouts</h1>
1212

1313
<a href="https://github.com/jbaysolutions/vue-grid-layout">View project on Github</a>
1414
<br/>
@@ -62,4 +62,4 @@ <h1>Vue Grid Layout Example 6 - Responsive</h1>
6262
<script src="../dist/vue-grid-layout.umd.min.js"></script>
6363
<script src="08-responsive-predefined-layouts.js"></script>
6464
</body>
65-
</html>
65+
</html>

examples/08-responsive-predefined-layouts.js

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -62,54 +62,15 @@ new Vue({
6262
responsive: true,
6363
index: 0
6464
},
65-
/*
6665
mounted: function () {
67-
this.index = this.layout.length;
66+
// this.index = this.layout.length;
6867
},
6968
methods: {
70-
increaseWidth: function(item) {
71-
var width = document.getElementById("content").offsetWidth;
72-
width += 20;
73-
document.getElementById("content").style.width = width+"px";
74-
},
75-
decreaseWidth: function(item) {
76-
77-
var width = document.getElementById("content").offsetWidth;
78-
width -= 20;
79-
document.getElementById("content").style.width = width+"px";
80-
},
81-
removeItem: function(item) {
82-
//console.log("### REMOVE " + item.i);
83-
this.layout.splice(this.layout.indexOf(item), 1);
84-
},
85-
addItem: function() {
86-
var self = this;
87-
//console.log("### LENGTH: " + this.layout.length);
88-
var item = {"x":0,"y":0,"w":2,"h":2,"i":this.index+"", whatever: "bbb"};
89-
this.index++;
90-
this.layout.push(item);
91-
},
9269
breakpointChangedEvent: function(newBreakpoint, newLayout){
9370
console.log("BREAKPOINT CHANGED breakpoint=", newBreakpoint, ", layout: ", newLayout );
9471
}
9572
}
96-
*/
9773
});
9874

99-
/*
100-
function generateLayout() {
101-
return _.map(_.range(0, 25), function (item, i) {
102-
var y = Math.ceil(Math.random() * 4) + 1;
103-
return {
104-
x: _.random(0, 5) * 2 % 12,
105-
y: Math.floor(i / 6) * y,
106-
w: 2,
107-
h: y,
108-
i: i.toString(),
109-
static: Math.random() < 0.05
110-
};
111-
});
112-
}*/
113-
11475

11576

0 commit comments

Comments
 (0)