Skip to content

Commit

Permalink
features update
Browse files Browse the repository at this point in the history
  • Loading branch information
sa-si-dev committed Mar 18, 2022
1 parent e9e69c9 commit 44f8c8d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Editor configuration, see https://editorconfig.org
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"printWidth": 120,
"singleQuote": true,
"quoteProps": "consistent"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "popover-plugin",
"version": "1.0.6",
"version": "1.0.7",
"description": "A javascript plugin for popover",
"scripts": {
"start": "webpack --mode development --watch",
Expand Down
9 changes: 7 additions & 2 deletions src/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ export class PopoverComponent {
$ele.popComp = this;
$ele.show = PopoverComponent.showMethod;
$ele.hide = PopoverComponent.hideMethod;
$ele.updatePosition = PopoverComponent.updatePositionMethod;

DomUtils.addClass(this.$ele, 'pop-comp-ele');
DomUtils.addClass(this.$popover, 'pop-comp-wrapper');
Expand Down Expand Up @@ -491,11 +492,15 @@ export class PopoverComponent {
}

static showMethod() {
return this.popComp.show();
this.popComp.show();
}

static hideMethod() {
return this.popComp.hide();
this.popComp.hide();
}

static updatePositionMethod() {
this.popComp.popper.updatePosition();
}
/** static methods - end */
}
Expand Down
3 changes: 2 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ const webpack = require('webpack');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const FileManagerPlugin = require('filemanager-webpack-plugin');
const { version } = require('./package.json');

const banner = `Popover v1.0.6
const banner = `Popover v${version}
https://sa-si-dev.github.io/popover
Licensed under MIT (https://github.com/sa-si-dev/popover/blob/master/LICENSE)`;

Expand Down

0 comments on commit 44f8c8d

Please sign in to comment.