Comparing version 9.3.7 to 9.3.8
@@ -34,2 +34,3 @@ import { Transform } from './Util.js'; | ||
_pointerDblClickPointerId: null; | ||
_fixTextRendering: boolean; | ||
pixelRatio: number; | ||
@@ -36,0 +37,0 @@ dragDistance: number; |
@@ -39,2 +39,3 @@ import { Arc } from './shapes/Arc.js'; | ||
_pointerDblClickPointerId: null; | ||
_fixTextRendering: boolean; | ||
pixelRatio: number; | ||
@@ -41,0 +42,0 @@ dragDistance: number; |
@@ -23,2 +23,3 @@ export declare const glob: any; | ||
_pointerDblClickPointerId: null; | ||
_fixTextRendering: boolean; | ||
pixelRatio: number; | ||
@@ -25,0 +26,0 @@ dragDistance: number; |
@@ -19,3 +19,3 @@ "use strict"; | ||
_global: exports.glob, | ||
version: '9.3.7', | ||
version: '9.3.8', | ||
isBrowser: detectBrowser(), | ||
@@ -41,2 +41,3 @@ isUnminified: /param/.test(function (param) { }.toString()), | ||
_pointerDblClickPointerId: null, | ||
_fixTextRendering: false, | ||
pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1, | ||
@@ -43,0 +44,0 @@ dragDistance: 3, |
@@ -65,3 +65,2 @@ import { Context } from '../Context.js'; | ||
fontFamily: GetSet<string, this>; | ||
textBaseline: GetSet<string, this>; | ||
fontSize: GetSet<number, this>; | ||
@@ -68,0 +67,0 @@ fontStyle: GetSet<string, this>; |
@@ -7,4 +7,5 @@ "use strict"; | ||
const Shape_1 = require("../Shape"); | ||
const Global_1 = require("../Global"); | ||
const Validators_1 = require("../Validators"); | ||
const Global_1 = require("../Global"); | ||
const Global_2 = require("../Global"); | ||
function stringToArray(string) { | ||
@@ -87,5 +88,6 @@ return Array.from(string); | ||
var translateY = lineHeightPx / 2; | ||
const baseline = this.textBaseline(); | ||
if (baseline === 'alphabetic') { | ||
var baseline = MIDDLE; | ||
if (Global_1.Konva._fixTextRendering) { | ||
var metrics = this.measureSize('M'); | ||
baseline = 'alphabetic'; | ||
translateY = | ||
@@ -395,3 +397,3 @@ (metrics.fontBoundingBoxAscent - metrics.fontBoundingBoxDescent) / 2 + | ||
]; | ||
(0, Global_1._registerNode)(Text); | ||
(0, Global_2._registerNode)(Text); | ||
Factory_1.Factory.overWriteSetter(Text, 'width', (0, Validators_1.getNumberOrAutoValidator)()); | ||
@@ -401,3 +403,2 @@ Factory_1.Factory.overWriteSetter(Text, 'height', (0, Validators_1.getNumberOrAutoValidator)()); | ||
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)()); | ||
@@ -404,0 +405,0 @@ Factory_1.Factory.addGetterSetter(Text, 'fontStyle', NORMAL); |
{ | ||
"name": "konva", | ||
"version": "9.3.7", | ||
"version": "9.3.8", | ||
"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
1402799
32643