Comparing version 9.3.6 to 9.3.7
@@ -160,3 +160,3 @@ import { Transform } from './Util.js'; | ||
pointerId?: number | undefined; | ||
dragStatus: "stopped" | "ready" | "dragging"; | ||
dragStatus: "ready" | "dragging" | "stopped"; | ||
}>; | ||
@@ -163,0 +163,0 @@ _drag(evt: any): void; |
@@ -165,3 +165,3 @@ import { Arc } from './shapes/Arc.js'; | ||
pointerId?: number | undefined; | ||
dragStatus: "stopped" | "ready" | "dragging"; | ||
dragStatus: "ready" | "dragging" | "stopped"; | ||
}>; | ||
@@ -168,0 +168,0 @@ _drag(evt: any): void; |
@@ -19,3 +19,3 @@ "use strict"; | ||
_global: exports.glob, | ||
version: '9.3.6', | ||
version: '9.3.7', | ||
isBrowser: detectBrowser(), | ||
@@ -22,0 +22,0 @@ isUnminified: /param/.test(function (param) { }.toString()), |
@@ -41,2 +41,13 @@ import { Context } from '../Context.js'; | ||
measureSize(text: any): { | ||
actualBoundingBoxAscent: any; | ||
actualBoundingBoxDescent: any; | ||
actualBoundingBoxLeft: any; | ||
actualBoundingBoxRight: any; | ||
alphabeticBaseline: any; | ||
emHeightAscent: any; | ||
emHeightDescent: any; | ||
fontBoundingBoxAscent: any; | ||
fontBoundingBoxDescent: any; | ||
hangingBaseline: any; | ||
ideographicBaseline: any; | ||
width: any; | ||
@@ -55,2 +66,3 @@ height: number; | ||
fontFamily: GetSet<string, this>; | ||
textBaseline: GetSet<string, this>; | ||
fontSize: GetSet<number, this>; | ||
@@ -57,0 +69,0 @@ fontStyle: GetSet<string, this>; |
@@ -85,4 +85,10 @@ "use strict"; | ||
direction = direction === INHERIT ? context.direction : direction; | ||
var translateY = 0; | ||
var translateY = lineHeightPx / 2; | ||
const baseline = this.textBaseline(); | ||
if (baseline === 'alphabetic') { | ||
var metrics = this.measureSize('M'); | ||
translateY = | ||
(metrics.fontBoundingBoxAscent - metrics.fontBoundingBoxDescent) / 2 + | ||
lineHeightPx / 2; | ||
} | ||
var lineTranslateX = 0; | ||
@@ -94,3 +100,3 @@ var lineTranslateY = 0; | ||
context.setAttr('font', this._getContextFont()); | ||
context.setAttr('textBaseline', MIDDLE); | ||
context.setAttr('textBaseline', baseline); | ||
context.setAttr('textAlign', LEFT); | ||
@@ -218,2 +224,13 @@ if (verticalAlign === MIDDLE) { | ||
return { | ||
actualBoundingBoxAscent: metrics.actualBoundingBoxAscent, | ||
actualBoundingBoxDescent: metrics.actualBoundingBoxDescent, | ||
actualBoundingBoxLeft: metrics.actualBoundingBoxLeft, | ||
actualBoundingBoxRight: metrics.actualBoundingBoxRight, | ||
alphabeticBaseline: metrics.alphabeticBaseline, | ||
emHeightAscent: metrics.emHeightAscent, | ||
emHeightDescent: metrics.emHeightDescent, | ||
fontBoundingBoxAscent: metrics.fontBoundingBoxAscent, | ||
fontBoundingBoxDescent: metrics.fontBoundingBoxDescent, | ||
hangingBaseline: metrics.hangingBaseline, | ||
ideographicBaseline: metrics.ideographicBaseline, | ||
width: metrics.width, | ||
@@ -384,2 +401,3 @@ height: fontSize, | ||
Factory_1.Factory.addGetterSetter(Text, 'fontFamily', 'Arial'); | ||
Factory_1.Factory.addGetterSetter(Text, 'textBaseline', MIDDLE); | ||
Factory_1.Factory.addGetterSetter(Text, 'fontSize', 12, (0, Validators_1.getNumberValidator)()); | ||
@@ -386,0 +404,0 @@ Factory_1.Factory.addGetterSetter(Text, 'fontStyle', NORMAL); |
@@ -388,2 +388,3 @@ "use strict"; | ||
if (!shape || !shape.isListening()) { | ||
this[eventType + 'ClickStartShape'] = undefined; | ||
return; | ||
@@ -390,0 +391,0 @@ } |
export declare function RGBComponent(val: number): number; | ||
export declare function alphaComponent(val: number): number; | ||
export declare function getNumberValidator(): (<T>(val: T, attr: string) => void | T) | undefined; | ||
export declare function getNumberOrArrayOfNumbersValidator(noOfElements: number): (<T>(val: T, attr: string) => void | T) | undefined; | ||
export declare function getNumberOrAutoValidator(): (<T extends string>(val: T, attr: string) => void | T) | undefined; | ||
export declare function getNumberValidator(): (<T>(val: T, attr: string) => T | void) | undefined; | ||
export declare function getNumberOrArrayOfNumbersValidator(noOfElements: number): (<T>(val: T, attr: string) => T | void) | undefined; | ||
export declare function getNumberOrAutoValidator(): (<T extends string>(val: T, attr: string) => T | void) | undefined; | ||
export declare function getStringValidator(): ((val: any, attr: string) => any) | undefined; | ||
@@ -7,0 +7,0 @@ export declare function getStringOrGradientValidator(): ((val: any, attr: string) => any) | undefined; |
{ | ||
"name": "konva", | ||
"version": "9.3.6", | ||
"version": "9.3.7", | ||
"author": "Anton Lavrenov", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1402741
32638