🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

complex-plugin

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

complex-plugin - npm Package Compare versions

Comparing version
4.9.1
to
4.9.2
+3
-0
history.md
### ToDo
### 4.9.2
- feat:PluginLayoutData添加visible属性及相关逻辑
### 4.9.1

@@ -4,0 +7,0 @@ - feat:修改模块加载逻辑为ES2020

+1
-1
{
"name": "complex-plugin",
"version": "4.9.1",
"version": "4.9.2",
"description": "a complex plugin",

@@ -5,0 +5,0 @@ "type": "module",

@@ -62,2 +62,3 @@ import { _Data, Life, throttle } from "complex-utils"

export interface PluginLayoutDataInitOption {
visible?: boolean
width?: number

@@ -72,2 +73,3 @@ height?: number

static $formatConfig = { name: 'PluginLayoutData', level: 80, recommend: true }
visible: boolean
width: number

@@ -78,2 +80,3 @@ height: number

constructor(initOption: PluginLayoutDataInitOption) {
this.visible = initOption.visible === undefined ? true : initOption.visible
this.width = initOption.width || 0

@@ -91,2 +94,11 @@ this.height = initOption.height || 0

}
show() {
this.visible = true
}
hide() {
this.visible = false
}
toggle() {
this.visible = !this.visible
}
change(width: number, height: number) {

@@ -102,8 +114,10 @@ if (this.width !== width || this.height !== height) {

count(extraLayout: PluginLayoutData) {
if (this.width) {
extraLayout.width += this.width
if (this.visible) {
if (this.width) {
extraLayout.width += this.width
}
if (this.height) {
extraLayout.height += this.height
}
}
if (this.height) {
extraLayout.height += this.height
}
}

@@ -110,0 +124,0 @@ }