Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lunit/insight-viewer

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

@lunit/insight-viewer - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

4

CHANGELOG.kr.md

@@ -7,2 +7,6 @@ # Changelog

## [1.2.3] - 2019-05-22
### Changed
- Contour 굵기에 최소값 지정
## [1.2.2] - 2019-05-22

@@ -9,0 +13,0 @@ ### Changed

57

dist/index.es.js

@@ -421,10 +421,10 @@ import * as dicomParser from 'dicom-parser';

ctx.lineWidth = thickness;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();
} else {
ctx.lineWidth = thickness;
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.stroke();
ctx.lineWidth = thickness / 3;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();

@@ -442,11 +442,11 @@ }

var vectorY = (anchor[1] - foot[1]) / length;
var arrowX = vectorX * 16 * scale;
var arrowY = vectorY * 16 * scale;
var scaledLineWidth = 6 * scale;
var arrowX = vectorX * Math.max(16 * scale, 4);
var arrowY = vectorY * Math.max(16 * scale, 4);
var scaledLineWidth = Math.max(6 * scale, 1);
ctx.save();
ctx.lineCap = 'square';
ctx.lineCap = "square";
ctx.lineWidth = scaledLineWidth;
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.beginPath();

@@ -457,9 +457,9 @@ ctx.moveTo(anchor[0] - arrowX, anchor[1] - arrowY);

ctx.lineWidth = scaledLineWidth / 3;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();
// arrow head
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.lineWidth = scaledLineWidth / 3;
ctx.fillStyle = 'white';
ctx.fillStyle = "white";
ctx.beginPath();

@@ -474,8 +474,8 @@ ctx.moveTo(anchor[0], anchor[1]);

// text
ctx.font = scaledLineWidth * 6 + 'px proximanova_semibold, sans-serif';
ctx.strokeStyle = 'black';
ctx.font = scaledLineWidth * 8 + "px proximanova_semibold, sans-serif";
ctx.strokeStyle = "black";
ctx.lineWidth = scaledLineWidth / 3 * 2;
var textMetrics = ctx.measureText(text);
var textX = anchor[0] - foot[0] < 0 ? foot[0] + scaledLineWidth : foot[0] - textMetrics.width - scaledLineWidth;
var textY = anchor[1] - foot[1] < 0 ? foot[1] + scaledLineWidth * 6 : foot[1];
var textY = anchor[1] - foot[1] < 0 ? foot[1] + scaledLineWidth * 7 : foot[1];
ctx.strokeText(text, textX, textY);

@@ -500,3 +500,3 @@ ctx.fillText(text, textX, textY);

createClass(Contour, [{
key: 'componentDidUpdate',
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {

@@ -511,19 +511,21 @@ if (this.props.contours !== prevProps.contours || this.props.viewport !== prevProps.viewport || this.props.enabled !== prevProps.enabled) {

}, {
key: 'render',
key: "render",
value: function render() {
var _this2 = this;
return React.createElement('canvas', { ref: function ref(canvas) {
return React.createElement("canvas", {
ref: function ref(canvas) {
_this2.drawingCanvas = canvas;
},
style: {
position: 'absolute',
position: "absolute",
top: 0,
left: 0,
width: '100%',
height: '100%'
} });
width: "100%",
height: "100%"
}
});
}
}, {
key: '_redraw',
key: "_redraw",
value: function _redraw(enabledElement) {

@@ -534,3 +536,3 @@ this.drawingCanvas.width = this.drawingCanvas.offsetWidth;

var noOutline = this.props.noOutline;
var ctx = this.drawingCanvas.getContext('2d');
var ctx = this.drawingCanvas.getContext("2d");
ctx.save();

@@ -544,3 +546,3 @@ setToPixelCoordinateSystem(enabledElement, ctx);

var scaledThickness = thickness * scale;
var scaledThickness = Math.max(thickness * scale, 1);
contour.forEach(function (points) {

@@ -563,5 +565,5 @@ var transformedPoints = points.map(function (point) {

}, {
key: '_clear',
key: "_clear",
value: function _clear() {
var ctx = this.drawingCanvas.getContext('2d');
var ctx = this.drawingCanvas.getContext("2d");
ctx.save();

@@ -589,4 +591,3 @@ // Use the identity matrix while clearing the canvas

viewport = _ref4.viewport;
return React.createElement(Contour, _extends({}, props, {
enabledElement: enabledElement, viewport: viewport }));
return React.createElement(Contour, _extends({}, props, { enabledElement: enabledElement, viewport: viewport }));
}

@@ -593,0 +594,0 @@ );

@@ -426,10 +426,10 @@ 'use strict';

ctx.lineWidth = thickness;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();
} else {
ctx.lineWidth = thickness;
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.stroke();
ctx.lineWidth = thickness / 3;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();

@@ -447,11 +447,11 @@ }

var vectorY = (anchor[1] - foot[1]) / length;
var arrowX = vectorX * 16 * scale;
var arrowY = vectorY * 16 * scale;
var scaledLineWidth = 6 * scale;
var arrowX = vectorX * Math.max(16 * scale, 4);
var arrowY = vectorY * Math.max(16 * scale, 4);
var scaledLineWidth = Math.max(6 * scale, 1);
ctx.save();
ctx.lineCap = 'square';
ctx.lineCap = "square";
ctx.lineWidth = scaledLineWidth;
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.beginPath();

@@ -462,9 +462,9 @@ ctx.moveTo(anchor[0] - arrowX, anchor[1] - arrowY);

ctx.lineWidth = scaledLineWidth / 3;
ctx.strokeStyle = 'white';
ctx.strokeStyle = "white";
ctx.stroke();
// arrow head
ctx.strokeStyle = 'black';
ctx.strokeStyle = "black";
ctx.lineWidth = scaledLineWidth / 3;
ctx.fillStyle = 'white';
ctx.fillStyle = "white";
ctx.beginPath();

@@ -479,8 +479,8 @@ ctx.moveTo(anchor[0], anchor[1]);

// text
ctx.font = scaledLineWidth * 6 + 'px proximanova_semibold, sans-serif';
ctx.strokeStyle = 'black';
ctx.font = scaledLineWidth * 8 + "px proximanova_semibold, sans-serif";
ctx.strokeStyle = "black";
ctx.lineWidth = scaledLineWidth / 3 * 2;
var textMetrics = ctx.measureText(text);
var textX = anchor[0] - foot[0] < 0 ? foot[0] + scaledLineWidth : foot[0] - textMetrics.width - scaledLineWidth;
var textY = anchor[1] - foot[1] < 0 ? foot[1] + scaledLineWidth * 6 : foot[1];
var textY = anchor[1] - foot[1] < 0 ? foot[1] + scaledLineWidth * 7 : foot[1];
ctx.strokeText(text, textX, textY);

@@ -505,3 +505,3 @@ ctx.fillText(text, textX, textY);

createClass(Contour, [{
key: 'componentDidUpdate',
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {

@@ -516,19 +516,21 @@ if (this.props.contours !== prevProps.contours || this.props.viewport !== prevProps.viewport || this.props.enabled !== prevProps.enabled) {

}, {
key: 'render',
key: "render",
value: function render() {
var _this2 = this;
return React.createElement('canvas', { ref: function ref(canvas) {
return React.createElement("canvas", {
ref: function ref(canvas) {
_this2.drawingCanvas = canvas;
},
style: {
position: 'absolute',
position: "absolute",
top: 0,
left: 0,
width: '100%',
height: '100%'
} });
width: "100%",
height: "100%"
}
});
}
}, {
key: '_redraw',
key: "_redraw",
value: function _redraw(enabledElement) {

@@ -539,3 +541,3 @@ this.drawingCanvas.width = this.drawingCanvas.offsetWidth;

var noOutline = this.props.noOutline;
var ctx = this.drawingCanvas.getContext('2d');
var ctx = this.drawingCanvas.getContext("2d");
ctx.save();

@@ -549,3 +551,3 @@ cornerstone.setToPixelCoordinateSystem(enabledElement, ctx);

var scaledThickness = thickness * scale;
var scaledThickness = Math.max(thickness * scale, 1);
contour.forEach(function (points) {

@@ -568,5 +570,5 @@ var transformedPoints = points.map(function (point) {

}, {
key: '_clear',
key: "_clear",
value: function _clear() {
var ctx = this.drawingCanvas.getContext('2d');
var ctx = this.drawingCanvas.getContext("2d");
ctx.save();

@@ -594,4 +596,3 @@ // Use the identity matrix while clearing the canvas

viewport = _ref4.viewport;
return React.createElement(Contour, _extends({}, props, {
enabledElement: enabledElement, viewport: viewport }));
return React.createElement(Contour, _extends({}, props, { enabledElement: enabledElement, viewport: viewport }));
}

@@ -598,0 +599,0 @@ );

{
"name": "@lunit/insight-viewer",
"version": "1.2.2",
"version": "1.2.3",
"description": "A React component for DICOM images",

@@ -5,0 +5,0 @@ "author": {

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