New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

js-draw

Package Overview
Dependencies
Maintainers
1
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-draw - npm Package Compare versions

Comparing version 1.24.1 to 1.24.2

11

dist/cjs/components/TextComponent.d.ts

@@ -79,2 +79,13 @@ import SerializableCommand from '../commands/SerializableCommand';

private recomputeBBox;
/**
* Renders a TextComponent or a TextComponent child onto a `canvas`.
*
* `visibleRect` can be provided as a performance optimization. If not the top-level
* text node, `baseTransform` (specifies the transformation of the parent text component
* in canvas space) should also be provided.
*
* Note that passing a `baseTransform` is preferable to transforming `visibleRect`. At high
* zoom levels, transforming `visibleRect` by the inverse of the parent transform can lead to
* inaccuracy due to precision loss.
*/
private renderInternal;

@@ -81,0 +92,0 @@ render(canvas: AbstractRenderer, visibleRect?: Rect2): void;

17

dist/cjs/components/TextComponent.js

@@ -157,7 +157,18 @@ "use strict";

}
renderInternal(canvas, visibleRect) {
/**
* Renders a TextComponent or a TextComponent child onto a `canvas`.
*
* `visibleRect` can be provided as a performance optimization. If not the top-level
* text node, `baseTransform` (specifies the transformation of the parent text component
* in canvas space) should also be provided.
*
* Note that passing a `baseTransform` is preferable to transforming `visibleRect`. At high
* zoom levels, transforming `visibleRect` by the inverse of the parent transform can lead to
* inaccuracy due to precision loss.
*/
renderInternal(canvas, visibleRect, baseTransform = math_1.Mat33.identity) {
const cursor = new TextComponent.TextCursor(this.transform, this.style);
for (const textObject of this.textObjects) {
const { transform, bbox } = cursor.update(textObject);
if (visibleRect && !visibleRect.intersects(bbox)) {
if (visibleRect && !visibleRect.intersects(bbox.transformedBoundingBox(baseTransform))) {
continue;

@@ -170,3 +181,3 @@ }

canvas.pushTransform(transform);
textObject.renderInternal(canvas, visibleRect?.transformedBoundingBox(transform.inverse()));
textObject.renderInternal(canvas, visibleRect, baseTransform.rightMul(transform));
canvas.popTransform();

@@ -173,0 +184,0 @@ }

2

dist/cjs/version.js

@@ -9,3 +9,3 @@ "use strict";

exports.default = {
number: '1.24.1',
number: '1.24.2',
};

@@ -79,2 +79,13 @@ import SerializableCommand from '../commands/SerializableCommand';

private recomputeBBox;
/**
* Renders a TextComponent or a TextComponent child onto a `canvas`.
*
* `visibleRect` can be provided as a performance optimization. If not the top-level
* text node, `baseTransform` (specifies the transformation of the parent text component
* in canvas space) should also be provided.
*
* Note that passing a `baseTransform` is preferable to transforming `visibleRect`. At high
* zoom levels, transforming `visibleRect` by the inverse of the parent transform can lead to
* inaccuracy due to precision loss.
*/
private renderInternal;

@@ -81,0 +92,0 @@ render(canvas: AbstractRenderer, visibleRect?: Rect2): void;

{
"name": "js-draw",
"version": "1.24.1",
"version": "1.24.2",
"description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ",

@@ -67,7 +67,7 @@ "types": "./dist/mjs/lib.d.ts",

"dependencies": {
"@js-draw/math": "^1.24.1",
"@js-draw/math": "^1.24.2",
"@melloware/coloris": "0.22.0"
},
"devDependencies": {
"@js-draw/build-tool": "^1.24.1",
"@js-draw/build-tool": "^1.24.2",
"@types/jest": "29.5.5",

@@ -90,3 +90,3 @@ "@types/jsdom": "21.1.3"

],
"gitHead": "ef847374748e32d6d96d993a2236a99d9109a32c"
"gitHead": "32c8db56fc8996c8d485118d1ee37077428344a3"
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc