@ni/spright-components 1.0.15 → 1.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16278,7 +16278,7 @@
|
|
|
16278
16278
|
|
|
16279
16279
|
/**
|
|
16280
16280
|
* Do not edit directly
|
|
16281
|
-
* Generated on
|
|
16281
|
+
* Generated on Fri, 07 Jun 2024 20:22:50 GMT
|
|
16282
16282
|
*/
|
|
16283
16283
|
|
|
16284
16284
|
const Information100DarkUi = "#a46eff";
|
|
@@ -59734,6 +59734,7 @@ img.ProseMirror-separator {
|
|
|
59734
59734
|
* @internal
|
|
59735
59735
|
*/
|
|
59736
59736
|
slottedOptionsChanged(prev, next) {
|
|
59737
|
+
const value = this.value;
|
|
59737
59738
|
this.options.forEach(o => {
|
|
59738
59739
|
const notifier = Observable.getNotifier(o);
|
|
59739
59740
|
notifier.unsubscribe(this, 'value');
|
|
@@ -59747,8 +59748,6 @@ img.ProseMirror-separator {
|
|
|
59747
59748
|
notifier.unsubscribe(this, 'listOptions');
|
|
59748
59749
|
});
|
|
59749
59750
|
const options = this.getSlottedOptions(next);
|
|
59750
|
-
// reset selectedIndex in case the selected option was removed or reordered
|
|
59751
|
-
this.selectedIndex = options.findIndex(o => o.selected);
|
|
59752
59751
|
super.slottedOptionsChanged(prev, options);
|
|
59753
59752
|
options.forEach(o => {
|
|
59754
59753
|
const notifier = Observable.getNotifier(o);
|
|
@@ -59768,6 +59767,9 @@ img.ProseMirror-separator {
|
|
|
59768
59767
|
// We need to force an update to the filteredOptions observable
|
|
59769
59768
|
// (by calling 'filterOptions()) so that the template correctly updates.
|
|
59770
59769
|
this.filterOptions();
|
|
59770
|
+
if (value) {
|
|
59771
|
+
this.value = value;
|
|
59772
|
+
}
|
|
59771
59773
|
}
|
|
59772
59774
|
/**
|
|
59773
59775
|
* @internal
|
|
@@ -78605,8 +78607,7 @@ img.ProseMirror-separator {
|
|
|
78605
78607
|
.join("-");
|
|
78606
78608
|
}
|
|
78607
78609
|
|
|
78608
|
-
// eslint-disable-next-line no-template-curly-in-string
|
|
78609
|
-
const workerCode = "var MatrixRenderer = (function (exports) {\n 'use strict';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol(\"Comlink.proxy\");\n const createEndpoint = Symbol(\"Comlink.endpoint\");\n const releaseProxy = Symbol(\"Comlink.releaseProxy\");\n const finalizer = Symbol(\"Comlink.finalizer\");\n const throwMarker = Symbol(\"Comlink.thrown\");\n const isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n }\n\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n labelsFontSize: 0,\n colorScale: []\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n setColumnIndices(columnIndices) {\n if (columnIndices.length === 0 || columnIndices[0] === undefined) {\n return;\n }\n const scaledColumnIndex = [\n this.calculateHorizontalScaledIndices(columnIndices[0])\n ];\n const columnPositions = [0];\n let prev = columnIndices[0];\n for (let i = 1; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n if (xIndex && xIndex !== prev) {\n const scaledX = this.calculateHorizontalScaledIndices(columnIndices[i]);\n scaledColumnIndex.push(scaledX);\n columnPositions.push(i);\n prev = xIndex;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n }\n setRowIndices(rowIndices) {\n this.scaledRowIndices = new Float64Array(rowIndices.length);\n for (let i = 0; i < rowIndices.length; i++) {\n this.scaledRowIndices[i] = this.calculateVerticalScaledIndices(rowIndices[i]);\n }\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext('2d');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = 'Green';\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n";
|
|
78610
|
+
const workerCode = "var MatrixRenderer = (function (exports) {\n 'use strict';\n\n /**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n const proxyMarker = Symbol(\"Comlink.proxy\");\n const createEndpoint = Symbol(\"Comlink.endpoint\");\n const releaseProxy = Symbol(\"Comlink.releaseProxy\");\n const finalizer = Symbol(\"Comlink.finalizer\");\n const throwMarker = Symbol(\"Comlink.thrown\");\n const isObject = (val) => (typeof val === \"object\" && val !== null) || typeof val === \"function\";\n /**\n * Internal transfer handle to handle objects marked to proxy.\n */\n const proxyTransferHandler = {\n canHandle: (val) => isObject(val) && val[proxyMarker],\n serialize(obj) {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port1);\n return [port2, [port2]];\n },\n deserialize(port) {\n port.start();\n return wrap(port);\n },\n };\n /**\n * Internal transfer handler to handle thrown exceptions.\n */\n const throwTransferHandler = {\n canHandle: (value) => isObject(value) && throwMarker in value,\n serialize({ value }) {\n let serialized;\n if (value instanceof Error) {\n serialized = {\n isError: true,\n value: {\n message: value.message,\n name: value.name,\n stack: value.stack,\n },\n };\n }\n else {\n serialized = { isError: false, value };\n }\n return [serialized, []];\n },\n deserialize(serialized) {\n if (serialized.isError) {\n throw Object.assign(new Error(serialized.value.message), serialized.value);\n }\n throw serialized.value;\n },\n };\n /**\n * Allows customizing the serialization of certain values.\n */\n const transferHandlers = new Map([\n [\"proxy\", proxyTransferHandler],\n [\"throw\", throwTransferHandler],\n ]);\n function isAllowedOrigin(allowedOrigins, origin) {\n for (const allowedOrigin of allowedOrigins) {\n if (origin === allowedOrigin || allowedOrigin === \"*\") {\n return true;\n }\n if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {\n return true;\n }\n }\n return false;\n }\n function expose(obj, ep = globalThis, allowedOrigins = [\"*\"]) {\n ep.addEventListener(\"message\", function callback(ev) {\n if (!ev || !ev.data) {\n return;\n }\n if (!isAllowedOrigin(allowedOrigins, ev.origin)) {\n console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);\n return;\n }\n const { id, type, path } = Object.assign({ path: [] }, ev.data);\n const argumentList = (ev.data.argumentList || []).map(fromWireValue);\n let returnValue;\n try {\n const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);\n const rawValue = path.reduce((obj, prop) => obj[prop], obj);\n switch (type) {\n case \"GET\" /* MessageType.GET */:\n {\n returnValue = rawValue;\n }\n break;\n case \"SET\" /* MessageType.SET */:\n {\n parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);\n returnValue = true;\n }\n break;\n case \"APPLY\" /* MessageType.APPLY */:\n {\n returnValue = rawValue.apply(parent, argumentList);\n }\n break;\n case \"CONSTRUCT\" /* MessageType.CONSTRUCT */:\n {\n const value = new rawValue(...argumentList);\n returnValue = proxy(value);\n }\n break;\n case \"ENDPOINT\" /* MessageType.ENDPOINT */:\n {\n const { port1, port2 } = new MessageChannel();\n expose(obj, port2);\n returnValue = transfer(port1, [port1]);\n }\n break;\n case \"RELEASE\" /* MessageType.RELEASE */:\n {\n returnValue = undefined;\n }\n break;\n default:\n return;\n }\n }\n catch (value) {\n returnValue = { value, [throwMarker]: 0 };\n }\n Promise.resolve(returnValue)\n .catch((value) => {\n return { value, [throwMarker]: 0 };\n })\n .then((returnValue) => {\n const [wireValue, transferables] = toWireValue(returnValue);\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n if (type === \"RELEASE\" /* MessageType.RELEASE */) {\n // detach and deactive after sending release response above.\n ep.removeEventListener(\"message\", callback);\n closeEndPoint(ep);\n if (finalizer in obj && typeof obj[finalizer] === \"function\") {\n obj[finalizer]();\n }\n }\n })\n .catch((error) => {\n // Send Serialization Error To Caller\n const [wireValue, transferables] = toWireValue({\n value: new TypeError(\"Unserializable return value\"),\n [throwMarker]: 0,\n });\n ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);\n });\n });\n if (ep.start) {\n ep.start();\n }\n }\n function isMessagePort(endpoint) {\n return endpoint.constructor.name === \"MessagePort\";\n }\n function closeEndPoint(endpoint) {\n if (isMessagePort(endpoint))\n endpoint.close();\n }\n function wrap(ep, target) {\n return createProxy(ep, [], target);\n }\n function throwIfProxyReleased(isReleased) {\n if (isReleased) {\n throw new Error(\"Proxy has been released and is not useable\");\n }\n }\n function releaseEndpoint(ep) {\n return requestResponseMessage(ep, {\n type: \"RELEASE\" /* MessageType.RELEASE */,\n }).then(() => {\n closeEndPoint(ep);\n });\n }\n const proxyCounter = new WeakMap();\n const proxyFinalizers = \"FinalizationRegistry\" in globalThis &&\n new FinalizationRegistry((ep) => {\n const newCount = (proxyCounter.get(ep) || 0) - 1;\n proxyCounter.set(ep, newCount);\n if (newCount === 0) {\n releaseEndpoint(ep);\n }\n });\n function registerProxy(proxy, ep) {\n const newCount = (proxyCounter.get(ep) || 0) + 1;\n proxyCounter.set(ep, newCount);\n if (proxyFinalizers) {\n proxyFinalizers.register(proxy, ep, proxy);\n }\n }\n function unregisterProxy(proxy) {\n if (proxyFinalizers) {\n proxyFinalizers.unregister(proxy);\n }\n }\n function createProxy(ep, path = [], target = function () { }) {\n let isProxyReleased = false;\n const proxy = new Proxy(target, {\n get(_target, prop) {\n throwIfProxyReleased(isProxyReleased);\n if (prop === releaseProxy) {\n return () => {\n unregisterProxy(proxy);\n releaseEndpoint(ep);\n isProxyReleased = true;\n };\n }\n if (prop === \"then\") {\n if (path.length === 0) {\n return { then: () => proxy };\n }\n const r = requestResponseMessage(ep, {\n type: \"GET\" /* MessageType.GET */,\n path: path.map((p) => p.toString()),\n }).then(fromWireValue);\n return r.then.bind(r);\n }\n return createProxy(ep, [...path, prop]);\n },\n set(_target, prop, rawValue) {\n throwIfProxyReleased(isProxyReleased);\n // FIXME: ES6 Proxy Handler `set` methods are supposed to return a\n // boolean. To show good will, we return true asynchronously ¯\\_(ツ)_/¯\n const [value, transferables] = toWireValue(rawValue);\n return requestResponseMessage(ep, {\n type: \"SET\" /* MessageType.SET */,\n path: [...path, prop].map((p) => p.toString()),\n value,\n }, transferables).then(fromWireValue);\n },\n apply(_target, _thisArg, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const last = path[path.length - 1];\n if (last === createEndpoint) {\n return requestResponseMessage(ep, {\n type: \"ENDPOINT\" /* MessageType.ENDPOINT */,\n }).then(fromWireValue);\n }\n // We just pretend that `bind()` didn’t happen.\n if (last === \"bind\") {\n return createProxy(ep, path.slice(0, -1));\n }\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"APPLY\" /* MessageType.APPLY */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n construct(_target, rawArgumentList) {\n throwIfProxyReleased(isProxyReleased);\n const [argumentList, transferables] = processArguments(rawArgumentList);\n return requestResponseMessage(ep, {\n type: \"CONSTRUCT\" /* MessageType.CONSTRUCT */,\n path: path.map((p) => p.toString()),\n argumentList,\n }, transferables).then(fromWireValue);\n },\n });\n registerProxy(proxy, ep);\n return proxy;\n }\n function myFlat(arr) {\n return Array.prototype.concat.apply([], arr);\n }\n function processArguments(argumentList) {\n const processed = argumentList.map(toWireValue);\n return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];\n }\n const transferCache = new WeakMap();\n function transfer(obj, transfers) {\n transferCache.set(obj, transfers);\n return obj;\n }\n function proxy(obj) {\n return Object.assign(obj, { [proxyMarker]: true });\n }\n function toWireValue(value) {\n for (const [name, handler] of transferHandlers) {\n if (handler.canHandle(value)) {\n const [serializedValue, transferables] = handler.serialize(value);\n return [\n {\n type: \"HANDLER\" /* WireValueType.HANDLER */,\n name,\n value: serializedValue,\n },\n transferables,\n ];\n }\n }\n return [\n {\n type: \"RAW\" /* WireValueType.RAW */,\n value,\n },\n transferCache.get(value) || [],\n ];\n }\n function fromWireValue(value) {\n switch (value.type) {\n case \"HANDLER\" /* WireValueType.HANDLER */:\n return transferHandlers.get(value.name).deserialize(value.value);\n case \"RAW\" /* WireValueType.RAW */:\n return value.value;\n }\n }\n function requestResponseMessage(ep, msg, transfers) {\n return new Promise((resolve) => {\n const id = generateUUID();\n ep.addEventListener(\"message\", function l(ev) {\n if (!ev.data || !ev.data.id || ev.data.id !== id) {\n return;\n }\n ep.removeEventListener(\"message\", l);\n resolve(ev.data);\n });\n if (ep.start) {\n ep.start();\n }\n ep.postMessage(Object.assign({ id }, msg), transfers);\n });\n }\n function generateUUID() {\n return new Array(4)\n .fill(0)\n .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString(16))\n .join(\"-\");\n }\n\n /* eslint-disable @typescript-eslint/member-ordering */\n /**\n * MatrixRenderer class is meant to be used within a Web Worker context,\n * using Comlink to facilitate communication between the main thread and the worker.\n * The MatrixRenderer class manages a matrix of dies, once an instance of MatrixRenderer is created,\n * it is exposed to the main thread using Comlink's `expose` method.\n * This setup is used in the wafer-map component to perform heavy computational duties\n */\n class MatrixRenderer {\n constructor() {\n this.values = Float64Array.from([]);\n this.scaledColumnIndices = Float64Array.from([]);\n this.scaledRowIndices = Float64Array.from([]);\n this.columnIndicesPositions = Int32Array.from([]);\n this.colorIndices = Int32Array.from([]);\n this.colors = [];\n this.colorValues = Float64Array.from([]);\n this.outsideRangeDieColor = 'rgba(218,223,236,1)';\n this.fontSizeFactor = 0.8;\n this.renderConfig = {\n dieDimensions: {\n width: 0,\n height: 0\n },\n margin: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n },\n verticalCoefficient: 1,\n horizontalCoefficient: 1,\n horizontalConstant: 0,\n verticalConstant: 0,\n gridMinX: 0,\n gridMaxX: 0,\n gridMinY: 0,\n gridMaxY: 0,\n labelsFontSize: 0,\n colorScale: [],\n dieLabelsSuffix: '',\n maxCharacters: 0\n };\n this.transformConfig = {\n transform: {\n k: 1,\n x: 0,\n y: 0\n },\n topLeftCanvasCorner: {\n x: 0,\n y: 0\n },\n bottomRightCanvasCorner: {\n x: 0,\n y: 0\n }\n };\n }\n isDieInGrid(x, y) {\n return (x >= this.renderConfig.gridMinX\n && x <= this.renderConfig.gridMaxX\n && y >= this.renderConfig.gridMinY\n && y <= this.renderConfig.gridMaxY);\n }\n calculateHorizontalScaledIndices(columnIndex) {\n return (this.renderConfig.horizontalCoefficient * columnIndex\n + this.renderConfig.horizontalConstant\n + this.renderConfig.margin.left);\n }\n calculateVerticalScaledIndices(rowIndex) {\n return (this.renderConfig.verticalCoefficient * rowIndex\n + this.renderConfig.verticalConstant\n + this.renderConfig.margin.top);\n }\n findColorIndex(value) {\n let index = -1;\n if (this.colorValues.length === 0 || this.colorValues[0] >= value) {\n return index;\n }\n for (let i = 0; i < this.colorValues.length; i++) {\n if (value <= this.colorValues[i]) {\n index = i;\n break;\n }\n }\n return index;\n }\n setMatrixData(columnIndices, rowIndices, valuesBuffer) {\n const scaledColumnIndex = [];\n const columnPositions = [];\n const scaledRowIndices = [];\n const values = [];\n const colorIndices = [];\n let prevXIndex;\n let dieCount = 0;\n for (let i = 0; i < columnIndices.length; i++) {\n const xIndex = columnIndices[i];\n const yIndex = rowIndices[i];\n if (this.isDieInGrid(xIndex, yIndex)) {\n if (xIndex !== prevXIndex) {\n scaledColumnIndex.push(this.calculateHorizontalScaledIndices(xIndex));\n columnPositions.push(dieCount);\n prevXIndex = xIndex;\n }\n scaledRowIndices.push(this.calculateVerticalScaledIndices(yIndex));\n const value = valuesBuffer[i];\n values.push(value);\n colorIndices.push(this.findColorIndex(value));\n dieCount += 1;\n }\n }\n this.scaledColumnIndices = Float64Array.from(scaledColumnIndex);\n this.columnIndicesPositions = Int32Array.from(columnPositions);\n this.scaledRowIndices = Float64Array.from(scaledRowIndices);\n this.values = Float64Array.from(values);\n this.colorIndices = Int32Array.from(colorIndices);\n }\n setRenderConfig(renderConfig) {\n this.renderConfig = renderConfig;\n this.colors = renderConfig.colorScale.map(marker => marker.color);\n this.colorValues = Float64Array.from(renderConfig.colorScale.map(marker => marker.value));\n }\n setTransformConfig(transformData) {\n this.transformConfig = transformData;\n }\n setCanvas(canvas) {\n this.canvas = canvas;\n this.context = canvas.getContext('2d');\n }\n scaleCanvas() {\n this.context.translate(this.transformConfig.transform.x, this.transformConfig.transform.y);\n this.context.scale(this.transformConfig.transform.k, this.transformConfig.transform.k);\n }\n setCanvasDimensions(data) {\n this.canvas.width = data.width;\n this.canvas.height = data.height;\n }\n getCanvasDimensions() {\n return {\n width: this.canvas.width,\n height: this.canvas.height\n };\n }\n clearCanvas() {\n this.context.clearRect(0, 0, this.canvas.width, this.canvas.height);\n }\n drawWafer() {\n this.context.restore();\n this.context.save();\n this.clearCanvas();\n this.scaleCanvas();\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n // Fill style is temporary green for all dies, will be replaced with a color based on the value of the die in a future implementation\n this.context.fillStyle = this.colors[this.colorIndices[columnStartIndex]]\n ?? this.outsideRangeDieColor;\n this.context.fillRect(scaledX, scaledY, this.renderConfig.dieDimensions.width, this.renderConfig.dieDimensions.height);\n }\n }\n }\n drawText() {\n this.context.font = `${this.renderConfig.labelsFontSize.toString()}px sans-serif`;\n this.context.fillStyle = '#ffffff';\n this.context.textAlign = 'center';\n this.context.lineCap = 'butt';\n const approximateTextHeight = this.context.measureText('M');\n for (let i = 0; i < this.scaledColumnIndices.length; i++) {\n const scaledX = this.scaledColumnIndices[i];\n if (!(scaledX >= this.transformConfig.topLeftCanvasCorner.x\n && scaledX < this.transformConfig.bottomRightCanvasCorner.x)) {\n continue;\n }\n // columnIndexPositions is used to get chunks to determine the start and end index of the column, it looks something like [0, 1, 4, 9, 12]\n // This means that the first column has a start index of 0 and an end index of 1, the second column has a start index of 1 and an end index of 4, and so on\n // scaledRowIndices is used when we reach the end of the columnIndexPositions, when columnIndexPositions is [0, 1, 4, 9, 12], scaledRowIndices is 13\n const columnEndIndex = this.columnIndicesPositions[i + 1] !== undefined\n ? this.columnIndicesPositions[i + 1]\n : this.scaledRowIndices.length;\n for (let columnStartIndex = this.columnIndicesPositions[i]; columnStartIndex < columnEndIndex; columnStartIndex++) {\n const scaledY = this.scaledRowIndices[columnStartIndex];\n if (!(scaledY >= this.transformConfig.topLeftCanvasCorner.y\n && scaledY < this.transformConfig.bottomRightCanvasCorner.y)) {\n continue;\n }\n let label = `${this.values[columnStartIndex] || 'NaN'}${this.renderConfig.dieLabelsSuffix}`;\n if (label.length >= this.renderConfig.maxCharacters) {\n label = `${label.substring(0, this.renderConfig.maxCharacters)}…`;\n }\n this.context.fillText(label, scaledX + this.renderConfig.dieDimensions.width / 2, scaledY\n + this.renderConfig.dieDimensions.height / 2\n + approximateTextHeight.width / 2, this.renderConfig.dieDimensions.width * this.fontSizeFactor);\n }\n }\n }\n }\n expose(MatrixRenderer);\n\n exports.MatrixRenderer = MatrixRenderer;\n\n return exports;\n\n})({});\n";
|
|
78610
78611
|
|
|
78611
78612
|
let url;
|
|
78612
78613
|
/**
|
|
@@ -78635,6 +78636,7 @@ img.ProseMirror-separator {
|
|
|
78635
78636
|
class WorkerRenderer {
|
|
78636
78637
|
constructor(wafermap) {
|
|
78637
78638
|
this.wafermap = wafermap;
|
|
78639
|
+
this.minDieDim = 100;
|
|
78638
78640
|
}
|
|
78639
78641
|
async setupWafer(snapshot) {
|
|
78640
78642
|
if (this.matrixRenderer === undefined) {
|
|
@@ -78645,8 +78647,7 @@ img.ProseMirror-separator {
|
|
|
78645
78647
|
}
|
|
78646
78648
|
await this.matrixRenderer.setCanvasDimensions(snapshot.canvasDimensions);
|
|
78647
78649
|
await this.matrixRenderer.setRenderConfig(snapshot.renderConfig);
|
|
78648
|
-
await this.matrixRenderer.
|
|
78649
|
-
await this.matrixRenderer.setRowIndices(snapshot.rowIndices);
|
|
78650
|
+
await this.matrixRenderer.setMatrixData(snapshot.columnIndices, snapshot.rowIndices, snapshot.values);
|
|
78650
78651
|
}
|
|
78651
78652
|
async drawWafer(snapshot) {
|
|
78652
78653
|
const topLeftCanvasCorner = snapshot.transform.invert([0, 0]);
|
|
@@ -78666,6 +78667,14 @@ img.ProseMirror-separator {
|
|
|
78666
78667
|
}
|
|
78667
78668
|
});
|
|
78668
78669
|
await this.matrixRenderer.drawWafer();
|
|
78670
|
+
if (!snapshot.dieLabelsHidden
|
|
78671
|
+
&& snapshot.dieDimensions
|
|
78672
|
+
&& snapshot.dieDimensions.width
|
|
78673
|
+
* snapshot.dieDimensions.height
|
|
78674
|
+
* (snapshot.transform.k || 1)
|
|
78675
|
+
>= this.minDieDim) {
|
|
78676
|
+
await this.matrixRenderer.drawText();
|
|
78677
|
+
}
|
|
78669
78678
|
}
|
|
78670
78679
|
renderHover() {
|
|
78671
78680
|
if (this.wafermap.computations.dieDimensions === undefined
|
|
@@ -78799,7 +78808,8 @@ img.ProseMirror-separator {
|
|
|
78799
78808
|
x: invertedPoint[0],
|
|
78800
78809
|
y: invertedPoint[1]
|
|
78801
78810
|
});
|
|
78802
|
-
if (dieCoordinates === undefined
|
|
78811
|
+
if (dieCoordinates === undefined
|
|
78812
|
+
|| !this.isDieInGrid(dieCoordinates.x, dieCoordinates.y)) {
|
|
78803
78813
|
this.wafermap.hoverDie = undefined;
|
|
78804
78814
|
return;
|
|
78805
78815
|
}
|
|
@@ -78859,6 +78869,12 @@ img.ProseMirror-separator {
|
|
|
78859
78869
|
}
|
|
78860
78870
|
return undefined;
|
|
78861
78871
|
}
|
|
78872
|
+
isDieInGrid(x, y) {
|
|
78873
|
+
return (x >= this.wafermap.computations.gridMinX
|
|
78874
|
+
&& x <= this.wafermap.computations.gridMaxX
|
|
78875
|
+
&& y >= this.wafermap.computations.gridMinY
|
|
78876
|
+
&& y <= this.wafermap.computations.gridMaxY);
|
|
78877
|
+
}
|
|
78862
78878
|
}
|
|
78863
78879
|
|
|
78864
78880
|
/**
|
|
@@ -78944,6 +78960,18 @@ img.ProseMirror-separator {
|
|
|
78944
78960
|
get verticalConstant() {
|
|
78945
78961
|
return this._verticalConstant;
|
|
78946
78962
|
}
|
|
78963
|
+
get gridMinX() {
|
|
78964
|
+
return this._gridMinX;
|
|
78965
|
+
}
|
|
78966
|
+
get gridMaxX() {
|
|
78967
|
+
return this._gridMaxX;
|
|
78968
|
+
}
|
|
78969
|
+
get gridMinY() {
|
|
78970
|
+
return this._gridMinY;
|
|
78971
|
+
}
|
|
78972
|
+
get gridMaxY() {
|
|
78973
|
+
return this._gridMaxY;
|
|
78974
|
+
}
|
|
78947
78975
|
get labelsFontSize() {
|
|
78948
78976
|
return this._labelsFontSize;
|
|
78949
78977
|
}
|
|
@@ -78984,14 +79012,17 @@ img.ProseMirror-separator {
|
|
|
78984
79012
|
return;
|
|
78985
79013
|
}
|
|
78986
79014
|
const containerDiameter = Math.min(this._containerDimensions.width, this._containerDimensions.height);
|
|
78987
|
-
|
|
78988
|
-
|
|
78989
|
-
|
|
79015
|
+
if (this.gridDimensionsValidAndDefined()) {
|
|
79016
|
+
this.setGridDimensionsFromBoundingBox();
|
|
79017
|
+
}
|
|
79018
|
+
else {
|
|
79019
|
+
this.setGridDimensionsFromDies();
|
|
79020
|
+
}
|
|
78990
79021
|
// this scale is used for positioning the dies on the canvas
|
|
78991
79022
|
const originLocation = this.wafermap.originLocation;
|
|
78992
|
-
this._horizontalScale = this.createHorizontalScale(originLocation,
|
|
79023
|
+
this._horizontalScale = this.createHorizontalScale(originLocation, containerDiameter);
|
|
78993
79024
|
// this scale is used for positioning the dies on the canvas
|
|
78994
|
-
this._verticalScale = this.createVerticalScale(originLocation,
|
|
79025
|
+
this._verticalScale = this.createVerticalScale(originLocation, containerDiameter);
|
|
78995
79026
|
this._horizontalCoefficient = this._horizontalScale(1) - this._horizontalScale(0);
|
|
78996
79027
|
this._verticalCoefficient = this._verticalScale(1) - this._verticalScale(0);
|
|
78997
79028
|
this._horizontalConstant = this._horizontalScale(0);
|
|
@@ -79017,22 +79048,15 @@ img.ProseMirror-separator {
|
|
|
79017
79048
|
&& typeof this.wafermap.gridMaxX === 'number'
|
|
79018
79049
|
&& typeof this.wafermap.gridMinX === 'number');
|
|
79019
79050
|
}
|
|
79020
|
-
|
|
79021
|
-
|
|
79022
|
-
|
|
79023
|
-
|
|
79024
|
-
|
|
79025
|
-
&& typeof this.wafermap.gridMinX === 'number') {
|
|
79026
|
-
gridDimensions.origin.x = this.wafermap.gridMinX;
|
|
79027
|
-
gridDimensions.origin.y = this.wafermap.gridMinY;
|
|
79028
|
-
gridDimensions.rows = this.wafermap.gridMaxY - this.wafermap.gridMinY + 1;
|
|
79029
|
-
gridDimensions.cols = this.wafermap.gridMaxX - this.wafermap.gridMinX + 1;
|
|
79030
|
-
}
|
|
79031
|
-
return gridDimensions;
|
|
79051
|
+
setGridDimensionsFromBoundingBox() {
|
|
79052
|
+
this._gridMinX = this.wafermap.gridMinX;
|
|
79053
|
+
this._gridMinY = this.wafermap.gridMinY;
|
|
79054
|
+
this._gridMaxX = this.wafermap.gridMaxX;
|
|
79055
|
+
this._gridMaxY = this.wafermap.gridMaxY;
|
|
79032
79056
|
}
|
|
79033
|
-
|
|
79057
|
+
setGridDimensionsFromDies() {
|
|
79034
79058
|
if (this.wafermap.diesTable === undefined) {
|
|
79035
|
-
return
|
|
79059
|
+
return;
|
|
79036
79060
|
}
|
|
79037
79061
|
const colIndex = this.wafermap.diesTable
|
|
79038
79062
|
.getChild('colIndex')
|
|
@@ -79057,11 +79081,10 @@ img.ProseMirror-separator {
|
|
|
79057
79081
|
maxPoint.y = rowIndex[i];
|
|
79058
79082
|
}
|
|
79059
79083
|
}
|
|
79060
|
-
|
|
79061
|
-
|
|
79062
|
-
|
|
79063
|
-
|
|
79064
|
-
};
|
|
79084
|
+
this._gridMinX = minPoint.x;
|
|
79085
|
+
this._gridMinY = minPoint.y;
|
|
79086
|
+
this._gridMaxX = maxPoint.x;
|
|
79087
|
+
this._gridMaxY = maxPoint.y;
|
|
79065
79088
|
}
|
|
79066
79089
|
calculateContainerDimensions(canvasDimensions, margin) {
|
|
79067
79090
|
return {
|
|
@@ -79069,30 +79092,30 @@ img.ProseMirror-separator {
|
|
|
79069
79092
|
height: canvasDimensions.height - margin.top - margin.bottom
|
|
79070
79093
|
};
|
|
79071
79094
|
}
|
|
79072
|
-
createHorizontalScale(originLocation,
|
|
79095
|
+
createHorizontalScale(originLocation, containerWidth) {
|
|
79073
79096
|
const scale = linear();
|
|
79074
79097
|
if (originLocation === WaferMapOriginLocation.bottomLeft
|
|
79075
79098
|
|| originLocation === WaferMapOriginLocation.topLeft) {
|
|
79076
79099
|
return scale
|
|
79077
|
-
.domain([
|
|
79100
|
+
.domain([this._gridMinX, this._gridMaxX + 1])
|
|
79078
79101
|
.range([0, containerWidth]);
|
|
79079
79102
|
}
|
|
79080
79103
|
return scale
|
|
79081
|
-
.domain([
|
|
79104
|
+
.domain([this._gridMinX - 1, this._gridMaxX])
|
|
79082
79105
|
.range([containerWidth, 0]);
|
|
79083
79106
|
}
|
|
79084
|
-
createVerticalScale(originLocation,
|
|
79107
|
+
createVerticalScale(originLocation, containerHeight) {
|
|
79085
79108
|
const scale = linear();
|
|
79086
79109
|
// html canvas has top-left origin https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes#the_grid
|
|
79087
79110
|
// we need to flip the vertical scale
|
|
79088
79111
|
if (originLocation === WaferMapOriginLocation.bottomLeft
|
|
79089
79112
|
|| originLocation === WaferMapOriginLocation.bottomRight) {
|
|
79090
79113
|
return scale
|
|
79091
|
-
.domain([
|
|
79114
|
+
.domain([this._gridMinY - 1, this._gridMaxY])
|
|
79092
79115
|
.range([containerHeight, 0]);
|
|
79093
79116
|
}
|
|
79094
79117
|
return scale
|
|
79095
|
-
.domain([
|
|
79118
|
+
.domain([this._gridMinY, this._gridMaxY + 1])
|
|
79096
79119
|
.range([0, containerHeight]);
|
|
79097
79120
|
}
|
|
79098
79121
|
calculateMarginAddition(baseMargin, addedMargin) {
|
|
@@ -79120,7 +79143,7 @@ img.ProseMirror-separator {
|
|
|
79120
79143
|
}
|
|
79121
79144
|
});
|
|
79122
79145
|
// the linear color scale will not be infinite but will be limited by the color scale resolution
|
|
79123
|
-
const valueSamples =
|
|
79146
|
+
const valueSamples = range(min, max, (max - min) / (values.length * this.colorScaleResolution)).concat(max);
|
|
79124
79147
|
return valueSamples.map(value => {
|
|
79125
79148
|
return {
|
|
79126
79149
|
color: d3ColorScale(value),
|
|
@@ -79309,30 +79332,42 @@ img.ProseMirror-separator {
|
|
|
79309
79332
|
horizontalCoefficient: this.computations.horizontalCoefficient,
|
|
79310
79333
|
horizontalConstant: this.computations.horizontalConstant,
|
|
79311
79334
|
verticalConstant: this.computations.verticalConstant,
|
|
79335
|
+
gridMinX: this.computations.gridMinX,
|
|
79336
|
+
gridMaxX: this.computations.gridMaxX,
|
|
79337
|
+
gridMinY: this.computations.gridMinY,
|
|
79338
|
+
gridMaxY: this.computations.gridMaxY,
|
|
79312
79339
|
labelsFontSize: this.computations.labelsFontSize,
|
|
79313
|
-
colorScale: this.computations.colorScale
|
|
79340
|
+
colorScale: this.computations.colorScale,
|
|
79341
|
+
dieLabelsSuffix: this.dieLabelsSuffix,
|
|
79342
|
+
maxCharacters: this.maxCharacters
|
|
79314
79343
|
};
|
|
79315
79344
|
const dieDimensions = this.computations.dieDimensions;
|
|
79316
79345
|
const transform = this.transform;
|
|
79346
|
+
const dieLabelsHidden = this.dieLabelsHidden;
|
|
79317
79347
|
if (this.diesTable === undefined) {
|
|
79318
79348
|
return {
|
|
79319
79349
|
canvasDimensions,
|
|
79320
79350
|
renderConfig,
|
|
79321
79351
|
dieDimensions,
|
|
79322
79352
|
transform,
|
|
79353
|
+
dieLabelsHidden,
|
|
79323
79354
|
columnIndices: Int32Array.from([]),
|
|
79324
|
-
rowIndices: Int32Array.from([])
|
|
79355
|
+
rowIndices: Int32Array.from([]),
|
|
79356
|
+
values: Float64Array.from([])
|
|
79325
79357
|
};
|
|
79326
79358
|
}
|
|
79327
79359
|
const columnIndices = this.diesTable.getChild('colIndex').toArray();
|
|
79328
79360
|
const rowIndices = this.diesTable.getChild('rowIndex').toArray();
|
|
79361
|
+
const values = this.diesTable.getChild('value').toArray();
|
|
79329
79362
|
return {
|
|
79330
79363
|
canvasDimensions,
|
|
79331
79364
|
renderConfig,
|
|
79332
79365
|
columnIndices,
|
|
79333
79366
|
rowIndices,
|
|
79367
|
+
values,
|
|
79334
79368
|
dieDimensions,
|
|
79335
|
-
transform
|
|
79369
|
+
transform,
|
|
79370
|
+
dieLabelsHidden
|
|
79336
79371
|
};
|
|
79337
79372
|
}
|
|
79338
79373
|
validate() {
|