@kitware/vtk.js 30.3.0 → 30.3.1
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.
- package/Rendering/Core/CubeAxesActor.js +18 -17
- package/package.json +1 -1
|
@@ -45,20 +45,18 @@ function applyTextStyle(ctx, style) {
|
|
|
45
45
|
ctx.fillStyle = style.fontColor;
|
|
46
46
|
ctx.font = `${style.fontStyle} ${style.fontSize}px ${style.fontFamily}`;
|
|
47
47
|
}
|
|
48
|
-
function defaultGenerateTicks(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
tickStrings
|
|
61
|
-
};
|
|
48
|
+
function defaultGenerateTicks(dataBounds) {
|
|
49
|
+
const ticks = [];
|
|
50
|
+
const tickStrings = [];
|
|
51
|
+
for (let i = 0; i < 3; i++) {
|
|
52
|
+
const scale = d3.scaleLinear().domain([dataBounds[i * 2], dataBounds[i * 2 + 1]]);
|
|
53
|
+
ticks[i] = scale.ticks(5);
|
|
54
|
+
const format = scale.tickFormat(5);
|
|
55
|
+
tickStrings[i] = ticks[i].map(format);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
ticks,
|
|
59
|
+
tickStrings
|
|
62
60
|
};
|
|
63
61
|
}
|
|
64
62
|
|
|
@@ -694,7 +692,7 @@ function defaultValues(publicAPI, model, initialValues) {
|
|
|
694
692
|
axisLabels: null,
|
|
695
693
|
axisTitlePixelOffset: 35.0,
|
|
696
694
|
tickLabelPixelOffset: 12.0,
|
|
697
|
-
generateTicks: defaultGenerateTicks
|
|
695
|
+
generateTicks: defaultGenerateTicks,
|
|
698
696
|
...initialValues,
|
|
699
697
|
axisTextStyle: {
|
|
700
698
|
fontColor: 'white',
|
|
@@ -731,7 +729,9 @@ function extend(publicAPI, model) {
|
|
|
731
729
|
model._tmAtlas = new Map();
|
|
732
730
|
|
|
733
731
|
// for texture atlas
|
|
734
|
-
model.tmTexture = vtkTexture.newInstance(
|
|
732
|
+
model.tmTexture = vtkTexture.newInstance({
|
|
733
|
+
resizable: true
|
|
734
|
+
});
|
|
735
735
|
model.tmTexture.setInterpolate(false);
|
|
736
736
|
publicAPI.getProperty().setDiffuse(0.0);
|
|
737
737
|
publicAPI.getProperty().setAmbient(1.0);
|
|
@@ -761,7 +761,8 @@ const newInstance = macro.newInstance(extend, 'vtkCubeAxesActor');
|
|
|
761
761
|
var vtkCubeAxesActor$1 = {
|
|
762
762
|
newInstance,
|
|
763
763
|
extend,
|
|
764
|
-
newCubeAxesActorHelper
|
|
764
|
+
newCubeAxesActorHelper,
|
|
765
|
+
defaultGenerateTicks
|
|
765
766
|
};
|
|
766
767
|
|
|
767
768
|
export { vtkCubeAxesActor$1 as default, extend, newInstance };
|