mirror of https://github.com/CesiumGS/cesium.git
Revert "Reduces redundant clamping on labels"
This reverts commit 83eb415e2a.
This commit is contained in:
parent
f99c570378
commit
3f678cae6b
|
|
@ -12,6 +12,7 @@
|
|||
- Improved performance and reduced memory usage of `Event` class. [#12896](https://github.com/CesiumGS/cesium/pull/12896)
|
||||
- Fixes vertical misalignment of glyphs in labels with small fonts [#8474](https://github.com/CesiumGS/cesium/issues/8474)
|
||||
- Prevent runtime errors for certain forms of invalid PNTS files [#12872](https://github.com/CesiumGS/cesium/issues/12872)
|
||||
- Improved performance of clamped labels [#12905](https://github.com/CesiumGS/cesium/pull/12905)
|
||||
|
||||
#### Additions :tada:
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import bitmapSDF from "bitmap-sdf";
|
|||
import BillboardCollection from "./BillboardCollection.js";
|
||||
import BillboardTexture from "./BillboardTexture.js";
|
||||
import BlendOption from "./BlendOption.js";
|
||||
import HeightReference, { isHeightReferenceClamp } from "./HeightReference.js";
|
||||
import { isHeightReferenceClamp } from "./HeightReference.js";
|
||||
import HorizontalOrigin from "./HorizontalOrigin.js";
|
||||
import Label from "./Label.js";
|
||||
import LabelStyle from "./LabelStyle.js";
|
||||
|
|
@ -307,8 +307,7 @@ function rebindAllGlyphs(labelCollection, label) {
|
|||
billboard.pixelOffset = label._pixelOffset;
|
||||
billboard.horizontalOrigin = HorizontalOrigin.LEFT;
|
||||
billboard.verticalOrigin = label._verticalOrigin;
|
||||
// To avoid excessive height update listeners, glyphs are not clamped. Their height values are updated manually by the owning label.
|
||||
billboard.heightReference = HeightReference.NONE;
|
||||
billboard.heightReference = label._heightReference;
|
||||
billboard.scale = label.totalScale;
|
||||
billboard.pickPrimitive = label;
|
||||
billboard.id = label._id;
|
||||
|
|
|
|||
|
|
@ -2446,8 +2446,6 @@ describe("Scene/LabelCollection", function () {
|
|||
});
|
||||
|
||||
expect(l._clampedPosition).toBeDefined();
|
||||
// Glyphs are not truly clamped (to avoid excessive listeners and globe picks). They simply copy their owning label's clamped position.
|
||||
expect(l._glyphs[0].billboard._clampedPosition).toBeUndefined();
|
||||
|
||||
l.heightReference = HeightReference.NONE;
|
||||
expect(l._clampedPosition).toBeUndefined();
|
||||
|
|
@ -2459,8 +2457,8 @@ describe("Scene/LabelCollection", function () {
|
|||
heightReference: HeightReference.CLAMP_TO_GROUND,
|
||||
text: "t",
|
||||
position: Cartesian3.fromDegrees(-72.0, 40.0),
|
||||
showBackground: true,
|
||||
});
|
||||
l.showBackground = true;
|
||||
|
||||
await pollToPromise(() => {
|
||||
scene.renderForSpecs();
|
||||
|
|
|
|||
Loading…
Reference in New Issue