Skip to content

Commit

Permalink
Build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alarie committed Jan 19, 2022
1 parent e9c01b1 commit f620b4b
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 32 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,13 @@ jobs:
with:
node-version: '9.x'
- name: Install dependencies
run: yarn
- run: yarn run build --if-present
run: npm i
- name: Build
run: npm run build --if-present
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: dist-without-markdown
path: |
dist
!dist/**/*.md
2 changes: 1 addition & 1 deletion dist/vue-multipane.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 30 additions & 27 deletions dist/vue-multipane.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
(factory((global.Multipane = {})));
}(this, (function (exports) { 'use strict';

var LAYOUT_HORIZONTAL = 'horizontal';
var LAYOUT_VERTICAL = 'vertical';
var LAYOUT_HORIZONTAL = "horizontal";
var LAYOUT_VERTICAL = "vertical";

var __vue_module__ = {
name: 'multipane',
name: "multipane",

props: {
layout: {
Expand All @@ -26,17 +26,19 @@ var __vue_module__ = {
computed: {
classnames: function classnames() {
return [
'multipane',
'layout-' + this.layout.slice(0, 1),
this.isResizing ? 'is-resizing' : '' ];
"multipane",
"layout-" + this.layout.slice(0, 1),
this.isResizing ? "is-resizing" : "" ];
},
cursor: function cursor() {
return this.isResizing
? this.layout == LAYOUT_VERTICAL ? 'col-resize' : 'row-resize'
: '';
? this.layout == LAYOUT_VERTICAL
? "col-resize"
: "row-resize"
: "";
},
userSelect: function userSelect() {
return this.isResizing ? 'none' : '';
return this.isResizing ? "none" : "";
},
},

Expand All @@ -46,13 +48,14 @@ var __vue_module__ = {
var initialPageX = ref.pageX;
var initialPageY = ref.pageY;


if (resizer.className && resizer.className.match('multipane-resizer')) {

if (
typeof resizer.className === "string" &&
resizer.className.match("multipane-resizer")
) {
// for stacked panes, make sure only the direct parent of the
// resizer acts
if (resizer.parentElement !== this.$el) {
return
return;
}

var self = this;
Expand All @@ -63,7 +66,7 @@ var __vue_module__ = {
var initialPaneWidth = pane.offsetWidth;
var initialPaneHeight = pane.offsetHeight;

var usePercentage = !!(pane.style.width + '').match('%');
var usePercentage = !!(pane.style.width + "").match("%");

var addEventListener = window.addEventListener;
var removeEventListener = window.removeEventListener;
Expand All @@ -76,17 +79,17 @@ var __vue_module__ = {
var paneWidth = initialSize + offset;

return (pane.style.width = usePercentage
? paneWidth / containerWidth * 100 + '%'
: paneWidth + 'px');
? (paneWidth / containerWidth) * 100 + "%"
: paneWidth + "px");
}

if (layout == LAYOUT_HORIZONTAL) {
var containerHeight = container.clientHeight;
var paneHeight = initialSize + offset;

return (pane.style.height = usePercentage
? paneHeight / containerHeight * 100 + '%'
: paneHeight + 'px');
? (paneHeight / containerHeight) * 100 + "%"
: paneHeight + "px");
}
};

Expand All @@ -97,9 +100,9 @@ var __vue_module__ = {
var size = resize();

// Trigger paneResizeStart event
self.$emit('paneResizeStart', pane, resizer, size);
self.$emit("paneResizeStart", pane, resizer, size);

var onMouseMove = function(ref) {
var onMouseMove = function (ref) {
var pageX = ref.pageX;
var pageY = ref.pageY;

Expand All @@ -108,10 +111,10 @@ var __vue_module__ = {
? resize(initialPaneWidth, pageX - initialPageX)
: resize(initialPaneHeight, pageY - initialPageY);

self.$emit('paneResize', pane, resizer, size);
self.$emit("paneResize", pane, resizer, size);
};

var onMouseUp = function() {
var onMouseUp = function () {
// Run resize one more time to set computed width/height.

size =
Expand All @@ -122,14 +125,14 @@ var __vue_module__ = {
// This removes is-resizing class to container
self.isResizing = false;

removeEventListener('mousemove', onMouseMove);
removeEventListener('mouseup', onMouseUp);
removeEventListener("mousemove", onMouseMove);
removeEventListener("mouseup", onMouseUp);

self.$emit('paneResizeStop', pane, resizer, size);
self.$emit("paneResizeStop", pane, resizer, size);
};

addEventListener('mousemove', onMouseMove);
addEventListener('mouseup', onMouseUp);
addEventListener("mousemove", onMouseMove);
addEventListener("mouseup", onMouseUp);
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion dist/vue-multipane.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"unpkg": "dist/vue-multipane.min.js",
"module": "dist/vue-multipane.esm.js",
"scripts": {
"build": "yarn run build:prod && yarn run build:dev && yarn run build:esm && yarn run build:demo",
"build": "npm run build:prod && npm run build:dev && npm run build:esm && npm run build:demo",
"build:prod": "cross-env rollup -c rollup.config.prod.js",
"build:dev": "cross-env rollup -c rollup.config.dev.js",
"build:esm": "cross-env rollup -c rollup.config.esm.js",
Expand Down

0 comments on commit f620b4b

Please sign in to comment.