Skip to content

Commit

Permalink
chore/test: 0.41 #107
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 24, 2020
1 parent a3396d9 commit 6572c44
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ a.on(karas.Event.END, function() {
#### zIndexChildren
* **类型** `Array<Dom/Text/Geom>`
* **说明**
此Dom下的直接孩子,且按照zIndex属性排好顺序,去除`mask`遮罩孩子
此Dom下的直接孩子,且按照zIndex属性排好顺序。

#### lineGroups
* **类型** `Array<Dom/Text/Geom>`
Expand Down Expand Up @@ -1208,12 +1208,12 @@ karas.render(
#### isClip
* **类型** `boolean` 只读
* **说明**
当前标签属性是否传入了`clip`表明图形是无透明遮罩。当为真值时,强制没有边线且没有透明度,因此只有封闭图形有效
当前标签属性是否传入了`clip`表明遮罩是裁剪性质。它和mask正好反过来,mask是只显示重合部分,clip是反之。`clip`依赖`mask`属性声明
* **示例**
```jsx
karas.render(
<canvas>
<$rect style={{width: 100, height:100}} clip={true}/>
<$rect style={{width: 100, height:100}} mask={true} clip={true}/>
</canvas>,
'#selector'
);
Expand Down
5 changes: 5 additions & 0 deletions csx.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,11 @@
描边转角
* stroke-miterlimit: Number
描边斜切比率
## 共有属性
* mask: Boolean
是否为遮罩,默认false。
* clip: Boolean
是否为裁剪性质的遮罩,默认false,依赖mask声明。
## 私有属性
### $circle
* r: Number
Expand Down
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16657,7 +16657,6 @@
isMask = _assertThisInitialize.isMask;

if (isMask) {
style.visibility = 'visible';
style.background = null;
style.border = null;
style.strokeWidth = 0;
Expand Down Expand Up @@ -24157,7 +24156,7 @@
Cache: Cache
};

var version = "0.40.14";
var version = "0.41.0";

Geom$1.register('$line', Line);
Geom$1.register('$polyline', Polyline);
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karas",
"version": "0.40.14",
"version": "0.41.0",
"description": "A flexible JavaScript framework for RIA on Canvas/Svg.",
"maintainers": [
{
Expand Down
1 change: 0 additions & 1 deletion src/geom/Geom.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Geom extends Xom {
this.__isClip = this.__isMask && !!this.props.clip;
let { style, isMask } = this;
if(isMask) {
style.visibility = 'visible';
style.background = null;
style.border = null;
style.strokeWidth = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/cache-mask-clip/test.js

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

2 changes: 1 addition & 1 deletion test/mask-clip/test.js

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

0 comments on commit 6572c44

Please sign in to comment.