Skip to content

Commit

Permalink
[CLEAN]: dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GopherJ committed Jul 23, 2018
1 parent 3ffc790 commit bb5d9bb
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 202 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Layout grid system in VueJs, see also:

## Introduction

This component for creating a dashboard more simply. All config of the dashboard will be saved in the vuex module `LayoutGrid`. In any component of
This component is for creating a dashboard more simply. All config of the dashboard will be saved in the vuex module `LayoutGrid`. In any component of
your SPA, you can add a new item or delete one. I've also added some new features:

- `table mode`
- `json/csv download`
- `UI`
- `UI design`

This component use `jbaysolutions/vue-grid-layout` internally and makes it more simple to use, that means the layout is controled in vuex and
every time we need to add a new item. We just to specify the `title`, `is`, `w`, `h` and `data`. It will calculate automatically the next position
and the `i` indentifier.
This component use `jbaysolutions/vue-grid-layout` internally and makes it simpler to use, that means the layout is controlled in vuex and every time
when we need to add a new item. We just need to specify the `title`, `is`, `w`, `h` and `data`. It will calculate automatically the next position and
also the identifier `i` .


## Installation
Expand Down
113 changes: 44 additions & 69 deletions dist/LayoutGrid.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/LayoutGrid.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/LayoutGrid.min.js.map

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-layout-grid",
"version": "0.1.8",
"version": "0.1.9",
"description": "layout gridster with vue",
"main": "dist/LayoutGrid.min.js",
"scripts": {
Expand All @@ -22,11 +22,8 @@
"buefy"
],
"dependencies": {
"blueimp-canvas-to-blob": "^3.14.0",
"buefy": "^0.6.3",
"file-saver": "^1.3.8",
"lodash": "^4.17.5",
"uuid": "^3.2.1",
"vue": "^2.5.13",
"vue-grid-layout": "^2.1.13",
"vuex": "^3.0.1"
Expand Down
15 changes: 1 addition & 14 deletions src/components/LayoutGrid/LayoutGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@
<script>
/* eslint-disable */
import VueGridLayout from 'vue-grid-layout';
import {mapMutations, mapState} from 'vuex';
import { mapMutations, mapState } from 'vuex';
import Emotion from './Emotion';
import Table from './Table';
import { getSVGString, svgString2Image } from '../../utils/svg2png';
import { saveAs } from 'file-saver/FileSaver';
const isObject = o => String(o) === '[object Object]';
const isArrayAndHasLength = arr => Array.isArray(arr) && arr.length > 0;
Expand Down Expand Up @@ -215,17 +213,6 @@
if (isFunction(component.safeDraw) && isDisplay(el)) component.safeDraw();
},
download(ev, title) {
const svg = this.getLayoutGridItem(ev).querySelector('svg'),
{ width, height } = svg.getBBox();
const svgString = getSVGString(svg);
svgString2Image( svgString, 2 * width, 2 * height, 'png', save);
function save( dataBlob, filesize ){
saveAs( dataBlob, title);
}
},
onMove(i, x, y) {
this.$emit('move', i, x, y);
},
Expand Down
3 changes: 0 additions & 3 deletions src/store/LayoutGridStore.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
/* eslint-disable */
import {
cloneLayoutItem,
cloneLayout,
calculateXYI,
findLayoutItemIndex,
} from '../utils';

import _ from 'lodash';

const namespaced = true;

const state = {
Expand Down
103 changes: 0 additions & 103 deletions src/utils/svg2png.js

This file was deleted.

0 comments on commit bb5d9bb

Please sign in to comment.