@lunit/insight-viewer
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -7,2 +7,6 @@ # Changelog | ||
## [1.2.1] - 2019-04-30 | ||
### Added | ||
- `ContourLayer`에 `noOutline` prop 추가 | ||
## [1.2.0] - 2019-04-29 | ||
@@ -9,0 +13,0 @@ ### Added |
@@ -407,3 +407,3 @@ import * as dicomParser from 'dicom-parser'; | ||
function drawContour(ctx, points, thickness) { | ||
function drawContour(ctx, points, thickness, noOutline) { | ||
ctx.beginPath(); | ||
@@ -420,8 +420,14 @@ ctx.moveTo(points[0][0], points[0][1]); | ||
ctx.closePath(); | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'black'; | ||
ctx.stroke(); | ||
ctx.lineWidth = thickness - 4; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
if (noOutline) { | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
} else { | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'black'; | ||
ctx.stroke(); | ||
ctx.lineWidth = thickness - 4; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
} | ||
} | ||
@@ -526,2 +532,3 @@ | ||
var scale = this.props.viewport.scale; | ||
var noOutline = this.props.noOutline; | ||
var ctx = this.drawingCanvas.getContext('2d'); | ||
@@ -539,3 +546,3 @@ ctx.save(); | ||
}); | ||
drawContour(ctx, transformedPoints, thickness); | ||
drawContour(ctx, transformedPoints, thickness, noOutline); | ||
}); | ||
@@ -542,0 +549,0 @@ }); |
@@ -412,3 +412,3 @@ 'use strict'; | ||
function drawContour(ctx, points, thickness) { | ||
function drawContour(ctx, points, thickness, noOutline) { | ||
ctx.beginPath(); | ||
@@ -425,8 +425,14 @@ ctx.moveTo(points[0][0], points[0][1]); | ||
ctx.closePath(); | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'black'; | ||
ctx.stroke(); | ||
ctx.lineWidth = thickness - 4; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
if (noOutline) { | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
} else { | ||
ctx.lineWidth = thickness; | ||
ctx.strokeStyle = 'black'; | ||
ctx.stroke(); | ||
ctx.lineWidth = thickness - 4; | ||
ctx.strokeStyle = 'white'; | ||
ctx.stroke(); | ||
} | ||
} | ||
@@ -531,2 +537,3 @@ | ||
var scale = this.props.viewport.scale; | ||
var noOutline = this.props.noOutline; | ||
var ctx = this.drawingCanvas.getContext('2d'); | ||
@@ -544,3 +551,3 @@ ctx.save(); | ||
}); | ||
drawContour(ctx, transformedPoints, thickness); | ||
drawContour(ctx, transformedPoints, thickness, noOutline); | ||
}); | ||
@@ -547,0 +554,0 @@ }); |
{ | ||
"name": "@lunit/insight-viewer", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "A React component for DICOM images", | ||
@@ -5,0 +5,0 @@ "author": { |
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
63413
1582