vue-split-pane
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -6,3 +6,3 @@ 'use strict'; | ||
var index = { | ||
name: 'split-pane', | ||
name: 'vue-split-pane', | ||
data: function data() { | ||
@@ -17,35 +17,53 @@ return { | ||
splitLeft: function splitLeft() { | ||
return "calc(".concat(this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc('.concat(this.split, '% - ').concat(this.gutter, 'px)'); | ||
}, | ||
splitRight: function splitRight() { | ||
return "calc(".concat(100 - this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc(' | ||
.concat(100 - this.split, '% - ') | ||
.concat(this.gutter, 'px)'); | ||
} | ||
}, | ||
render: function render(h) { | ||
return h('div', { | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
return h( | ||
'div', | ||
{ | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, [h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, this.$slots.left), h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, this.$slots.right)]); | ||
[ | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, | ||
this.$slots.left | ||
), | ||
h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, | ||
this.$slots.right | ||
) | ||
] | ||
); | ||
}, | ||
@@ -62,3 +80,3 @@ methods: { | ||
var totalWidth = this.$el.offsetWidth; | ||
this.split = this.startSplit + ~~(dx / totalWidth * 100); | ||
this.split = this.startSplit + ~~((dx / totalWidth) * 100); | ||
} | ||
@@ -65,0 +83,0 @@ }, |
var index = { | ||
name: 'split-pane', | ||
name: 'vue-split-pane', | ||
data: function data() { | ||
@@ -12,35 +12,53 @@ return { | ||
splitLeft: function splitLeft() { | ||
return "calc(".concat(this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc('.concat(this.split, '% - ').concat(this.gutter, 'px)'); | ||
}, | ||
splitRight: function splitRight() { | ||
return "calc(".concat(100 - this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc(' | ||
.concat(100 - this.split, '% - ') | ||
.concat(this.gutter, 'px)'); | ||
} | ||
}, | ||
render: function render(h) { | ||
return h('div', { | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
return h( | ||
'div', | ||
{ | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, [h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, this.$slots.left), h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, this.$slots.right)]); | ||
[ | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, | ||
this.$slots.left | ||
), | ||
h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, | ||
this.$slots.right | ||
) | ||
] | ||
); | ||
}, | ||
@@ -57,3 +75,3 @@ methods: { | ||
var totalWidth = this.$el.offsetWidth; | ||
this.split = this.startSplit + ~~(dx / totalWidth * 100); | ||
this.split = this.startSplit + ~~((dx / totalWidth) * 100); | ||
} | ||
@@ -60,0 +78,0 @@ }, |
@@ -1,9 +0,12 @@ | ||
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(factory((global.SplitPane = {}))); | ||
}(this, (function (exports) { 'use strict'; | ||
(function(global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' | ||
? factory(exports) | ||
: typeof define === 'function' && define.amd | ||
? define(['exports'], factory) | ||
: factory((global.VueSplitPane = {})); | ||
})(this, function(exports) { | ||
'use strict'; | ||
var index = { | ||
name: 'split-pane', | ||
name: 'vue-split-pane', | ||
data: function data() { | ||
@@ -18,35 +21,53 @@ return { | ||
splitLeft: function splitLeft() { | ||
return "calc(".concat(this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc('.concat(this.split, '% - ').concat(this.gutter, 'px)'); | ||
}, | ||
splitRight: function splitRight() { | ||
return "calc(".concat(100 - this.split, "% - ").concat(this.gutter, "px)"); | ||
return 'calc(' | ||
.concat(100 - this.split, '% - ') | ||
.concat(this.gutter, 'px)'); | ||
} | ||
}, | ||
render: function render(h) { | ||
return h('div', { | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
return h( | ||
'div', | ||
{ | ||
class: { | ||
'split-pane': true, | ||
'is-dragging': this.dragging | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, | ||
on: { | ||
mousemove: this.dragMove, | ||
mouseup: this.dragEnd, | ||
mouseleave: this.dragEnd | ||
} | ||
}, [h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, this.$slots.left), h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), h('div', { | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, this.$slots.right)]); | ||
[ | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitLeft | ||
} | ||
}, | ||
this.$slots.left | ||
), | ||
h('div', { | ||
class: 'split-pane-gutter', | ||
on: { | ||
mousedown: this.dragStart | ||
} | ||
}), | ||
h( | ||
'div', | ||
{ | ||
class: 'split-pane-item', | ||
style: { | ||
width: this.splitRight | ||
} | ||
}, | ||
this.$slots.right | ||
) | ||
] | ||
); | ||
}, | ||
@@ -63,3 +84,3 @@ methods: { | ||
var totalWidth = this.$el.offsetWidth; | ||
this.split = this.startSplit + ~~(dx / totalWidth * 100); | ||
this.split = this.startSplit + ~~((dx / totalWidth) * 100); | ||
} | ||
@@ -76,3 +97,2 @@ }, | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
}))); | ||
}); |
{ | ||
"name": "vue-split-pane", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Adjustable split pane using Vue.js", | ||
@@ -10,4 +10,4 @@ "author": "Dang Van Thanh <dangvanthanh@dangthanh.org>", | ||
"scripts": { | ||
"build": "bili src/index.js --format umd,cjs,es --exports named --module-name SplitPane", | ||
"example": "poi example/index.js" | ||
"precommit": "pretty-quick --staged", | ||
"build": "bili src/index.js --format umd,cjs,es --exports named --module-name VueSplitPane" | ||
}, | ||
@@ -29,4 +29,6 @@ "peerDependencies": { | ||
"bili": "^3.1.2", | ||
"poi": "^10.1.7" | ||
"husky": "^0.14.3", | ||
"prettier": "1.13.7", | ||
"pretty-quick": "^1.6.0" | ||
} | ||
} |
export default { | ||
name: 'split-pane', | ||
name: 'vue-split-pane', | ||
data() { | ||
@@ -66,3 +66,3 @@ return { | ||
const totalWidth = this.$el.offsetWidth; | ||
this.split = this.startSplit + ~~(dx / totalWidth * 100); | ||
this.split = this.startSplit + ~~((dx / totalWidth) * 100); | ||
} | ||
@@ -69,0 +69,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65305
361
1
4
10