Merge pull request #618 from Dmitry221060/master

Examples fix
This commit is contained in:
Anton Lavrenov 2019-03-25 12:32:56 -05:00 committed by GitHub
commit e32052ca81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 21 deletions

View File

@ -1167,7 +1167,7 @@ export abstract class Node<Config extends NodeConfig = NodeConfig> {
* // move node in x direction by 1px and y direction by 2px * // move node in x direction by 1px and y direction by 2px
* node.move({ * node.move({
* x: 1, * x: 1,
* y: 2) * y: 2
* }); * });
*/ */
move(change) { move(change) {
@ -2405,7 +2405,7 @@ Factory.addGetterSetter(Node, 'zIndex');
* *
* // set position * // set position
* node.absolutePosition({ * node.absolutePosition({
* x: 5 * x: 5,
* y: 10 * y: 10
* }); * });
*/ */
@ -2426,7 +2426,7 @@ Factory.addGetterSetter(Node, 'position');
* *
* // set position * // set position
* node.position({ * node.position({
* x: 5 * x: 5,
* y: 10 * y: 10
* }); * });
*/ */
@ -2568,7 +2568,7 @@ Factory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);
* *
* // set scale * // set scale
* shape.scale({ * shape.scale({
* x: 2 * x: 2,
* y: 3 * y: 3
* }); * });
*/ */
@ -2621,7 +2621,7 @@ Factory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);
* *
* // set skew * // set skew
* node.skew({ * node.skew({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -2673,7 +2673,7 @@ Factory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);
* *
* // set offset * // set offset
* node.offset({ * node.offset({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */

View File

@ -1095,7 +1095,7 @@ Factory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);
* *
* // set shadow offset * // set shadow offset
* shape.shadowOffset({ * shape.shadowOffset({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1440,7 +1440,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);
* *
* // set fill pattern offset * // set fill pattern offset
* shape.fillPatternOffset({ * shape.fillPatternOffset({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1493,7 +1493,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);
* *
* // set fill pattern scale * // set fill pattern scale
* shape.fillPatternScale({ * shape.fillPatternScale({
* x: 2 * x: 2,
* y: 2 * y: 2
* }); * });
*/ */
@ -1549,7 +1549,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [
* *
* // set fill linear gradient start point * // set fill linear gradient start point
* shape.fillLinearGradientStartPoint({ * shape.fillLinearGradientStartPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1573,7 +1573,7 @@ Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [
* *
* // set stroke linear gradient start point * // set stroke linear gradient start point
* shape.strokeLinearGradientStartPoint({ * shape.strokeLinearGradientStartPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1660,7 +1660,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [
* *
* // set fill linear gradient end point * // set fill linear gradient end point
* shape.fillLinearGradientEndPoint({ * shape.fillLinearGradientEndPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1684,7 +1684,7 @@ Factory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [
* *
* // set stroke linear gradient end point * // set stroke linear gradient end point
* shape.strokeLinearGradientEndPoint({ * shape.strokeLinearGradientEndPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1768,7 +1768,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [
* *
* // set fill radial gradient start point * // set fill radial gradient start point
* shape.fillRadialGradientStartPoint({ * shape.fillRadialGradientStartPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */
@ -1822,7 +1822,7 @@ Factory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [
* *
* // set fill radial gradient end point * // set fill radial gradient end point
* shape.fillRadialGradientEndPoint({ * shape.fillRadialGradientEndPoint({
* x: 20 * x: 20,
* y: 10 * y: 10
* }); * });
*/ */

View File

@ -23,7 +23,7 @@ export interface CircleConfig extends ShapeConfig {
* var circle = new Konva.Circle({ * var circle = new Konva.Circle({
* radius: 40, * radius: 40,
* fill: 'red', * fill: 'red',
* stroke: 'black' * stroke: 'black',
* strokeWidth: 5 * strokeWidth: 5
* }); * });
*/ */

View File

@ -25,7 +25,8 @@ export interface EllipseConfig extends ShapeConfig {
* radius : { * radius : {
* x : 50, * x : 50,
* y : 50 * y : 50
* } * fill: 'red' * },
* fill: 'red'
* }); * });
*/ */
export class Ellipse extends Shape<EllipseConfig> { export class Ellipse extends Shape<EllipseConfig> {

View File

@ -55,7 +55,8 @@ export interface SpriteConfig extends ShapeConfig {
* 229, 109, 60, 98, * 229, 109, 60, 98,
* 287, 109, 41, 98 * 287, 109, 41, 98
* ] * ]
* } * frameRate: 7, * },
* frameRate: 7,
* frameIndex: 0 * frameIndex: 0
* }); * });
* }; * };

View File

@ -49,12 +49,13 @@ function _strokeFunc(context) {
* 'A': { * 'A': {
* ' ': -0.05517578125, * ' ': -0.05517578125,
* 'T': -0.07421875, * 'T': -0.07421875,
* 'V': -0.07421875, * 'V': -0.07421875
* } * 'V': { * }
* 'V': {
* ',': -0.091796875, * ',': -0.091796875,
* ":": -0.037109375, * ":": -0.037109375,
* ";": -0.037109375, * ";": -0.037109375,
* "A": -0.07421875, * "A": -0.07421875
* } * }
* } * }
* var textpath = new Konva.TextPath({ * var textpath = new Konva.TextPath({