Skip to content

Commit

Permalink
Readme fixed and updated
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmurashov committed May 7, 2021
1 parent 4f78b56 commit 32a6e5c
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 17 deletions.
55 changes: 42 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,10 @@ Type: `Boolean`<br>
Required: `false`<br>
Default: `false`

Disable behavior of the component by clicking on it and clicking outside the component's area (isActive: true / false).
Disable behavior of the component by clicking on it and clicking outside the component's area (isActive: true / false).<br>
If the prop is enabled, the component is oriented only to the specified.

通过单击组件并单击组件区域外部来禁用组件的行为(isActive:true / false)。
通过单击组件并单击组件区域外部来禁用组件的行为(isActive:true / false)。<br>
如果启用了prop,则组件仅面向指定的。

```html
Expand All @@ -135,9 +135,10 @@ Type: `Number`<br>
Required: `false`<br>
Default: `0`

Define the initial width of the parent element. If not specified it calculated automatically.
Define the initial width of the parent element. If not specified it calculated automatically.<br>
With this parameter, you can set the bounding area for the component, and also it is used when resizing in real time.
定义父元素的初始宽度。 如果未指定,则自动计算。

定义父元素的初始宽度。 如果未指定,则自动计算。<br>
使用此参数,您可以设置组件的边界区域,并在实时调整大小时使用它。
```html
<vue-drag-resize :parentW="2000">
Expand All @@ -148,8 +149,9 @@ Type: `Number`<br>
Required: `false`<br>
Default: `0`

Define the initial height of the parent element. If not specified it calculated automatically.
Define the initial height of the parent element. If not specified it calculated automatically.<br>
With this parameter, you can set the bounding area for the component, and also it is used when resizing in real time.

定义父元素的初始高度。 如果未指定,则自动计算。
使用此参数,您可以设置组件的边界区域,并在实时调整大小时使用它。

Expand All @@ -162,9 +164,10 @@ Type: `Number`<br>
Required: `false`<br>
Default: `1`

Define the initial horizontal scale or the parent element. Same value in parent's transform: scale() css definition.
Define the initial horizontal scale or the parent element. Same value in parent's transform: scale() css definition.<br>
The drag/resize and the sticks' sizes will computed with this value.
定义初始水平比例或父元素。父级的transform:scale()css定义中的值相同。

定义初始水平比例或父元素。父级的transform:scale()css定义中的值相同。<br>
拖动/调整大小和杆的大小将使用该值计算。
```html
<vue-drag-resize :parentScaleX="0.5">
Expand All @@ -175,10 +178,10 @@ Type: `Number`<br>
Required: `false`<br>
Default: `1`

Define the initial vertical scale or the parent element. Same value in parent's transform: scale() css definition.
Define the initial vertical scale or the parent element. Same value in parent's transform: scale() css definition.<br>
The drag/resize and the sticks' sizes will computed with this value.
定义初始垂直比例或父元素。父级的transform:scale()css定义中的值相同。

定义初始垂直比例或父元素。父级的transform:scale()css定义中的值相同。<br>
拖动/调整大小和杆的大小将使用该值计算。

```html
Expand All @@ -191,6 +194,7 @@ Required: `false`<br>
Default: `true`

Determines whether the component should draggable.

确定组件是否应可拖动。


Expand All @@ -204,6 +208,7 @@ Required: `false`<br>
Default: `true`

Determines whether the component should resize.

确定组件是否应调整大小。


Expand All @@ -216,6 +221,7 @@ Required: `false`<br>
Default: `false`

Limits the scope of the component's change to its parent size.

将组件更改的范围限制为其父大小。


Expand Down Expand Up @@ -262,6 +268,7 @@ Required: `false`<br>
Default: `false`

Determines whether the component should retain its proportions.

确定组件是否应保持其比例。


Expand All @@ -270,11 +277,14 @@ Determines whether the component should retain its proportions.
```

#### w
Type: `Number`<br>
Type: `Number|String`<br>
Required: `false`<br>
Default: `200`

Define the initial width of the component.
Define the initial width of the component.<br>
The value can either be a number >= 0 or the string 'auto'. <br>
If set to 'auto', the initial width value will be equal to the width of the content within the component.

定义组件的初始宽度。


Expand All @@ -283,11 +293,14 @@ Define the initial width of the component.
```

#### h
Type: `Number`<br>
Type: `Number|String`<br>
Required: `false`<br>
Default: `200`

Define the initial height of the component.
Define the initial height of the component.<br>
The value can either be a number >= 0 or the string 'auto'. <br>
If set to 'auto', the initial height value will be equal to the height of the content within the component.

定义组件的初始高度。


Expand All @@ -302,6 +315,7 @@ Required: `false`<br>
Default: `50`

Define the minimal width of the component.

定义组件的初始宽度。


Expand All @@ -316,6 +330,7 @@ Required: `false`<br>
Default: `50`

Define the minimal height of the component.

定义组件的最小高度。


Expand All @@ -329,6 +344,7 @@ Required: `false`<br>
Default: `0`

Define the initial x position of the component.

定义组件的初始X位置。


Expand All @@ -342,6 +358,7 @@ Required: `false`<br>
Default: `0`

Define the initial y position of the component.

定义组件的初始Y位置。


Expand All @@ -355,6 +372,7 @@ Required: `false`<br>
Default: `auto`

Define the zIndex of the component.

定义组件的zindex(层级)。

```html
Expand All @@ -378,6 +396,7 @@ Required: `false`<br>
Default: `['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']`

Define the array of handles to restrict the element resizing:

定义句柄数组以限制元素大小调整:

* `tl` - Top left
Expand All @@ -399,6 +418,7 @@ Required: `false`<br>
Default: `both`

Define the axis on which the element is draggable. Available values are `x`, `y`, `both` or `none`.

定义元素可拖动的轴。 可用值为`x``y``both``none`

```html
Expand All @@ -410,6 +430,7 @@ Type: `String`<br>
Required: `false`

Defines the selector that should be used to drag the component.

定义应该用于拖动组件的选择器。

```html
Expand All @@ -421,6 +442,7 @@ Type: `String`<br>
Required: `false`

Defines a selector that should be used to prevent drag initialization.

定义应该用于防止拖动初始化的选择器。

```html
Expand Down Expand Up @@ -450,6 +472,7 @@ Required: `false`<br>
Parameters: `Original event handler`

Called whenever the component gets clicked.

单击组件时调用。

```html
Expand All @@ -462,6 +485,7 @@ Required: `false`<br>
Parameters: `-`

Called whenever the component gets clicked, in order to show handles.

单击组件时调用,以显示句柄。

```html
Expand All @@ -474,6 +498,7 @@ Required: `false`<br>
Parameters: `-`

Called whenever the user clicks anywhere outside the component, in order to deactivate it.

每当用户单击组件外部的任何位置时调用,以便将其停用。


Expand All @@ -496,6 +521,7 @@ Parameters: `object`
```

Called whenever the component gets resized.

每当组件调整大小时调用。


Expand All @@ -517,6 +543,7 @@ Parameters: `object`
```

Called whenever the component stops getting resized.

每当组件停止调整大小时调用。


Expand All @@ -538,6 +565,7 @@ Parameters: `object`
```

Called whenever the component gets dragged.

每当拖动组件时调用。


Expand All @@ -560,6 +588,7 @@ Parameters: `object`


Called whenever the component stops getting dragged.

每当组件停止拖动时调用。


Expand Down
2 changes: 1 addition & 1 deletion src/component/vue-drag-resize.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.vdr {
position: absolute;
box-sizing: border-box;
overflow: visible;

}
.vdr.active:before{
content: '';
Expand Down
3 changes: 0 additions & 3 deletions src/component/vue-drag-resize.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ export default {
isResizable: {
type: Boolean, default: true,
},
focusable: {
type: Boolean, default: false,
},
aspectRatio: {
type: Boolean, default: false,
},
Expand Down

0 comments on commit 32a6e5c

Please sign in to comment.