From 953faadd23846ccf0206d306d41e2a74a1751032 Mon Sep 17 00:00:00 2001 From: golyalpha Date: Mon, 6 Aug 2018 20:34:49 +0200 Subject: [PATCH] Fix types in multiple classes [CesiumJS] (#27672) * Changes to mutiple classes Fixed types of PolygonGraphics - the type of fill property should be boolean - the types in constructor's options object should match the types of the class properties Fixed types of LabelGraphics - the font property is a string specifying the CSS font - see change notes to PolygonGraphics Fixed types of EllipseGraphics - the outlineColor prop is of type Color, not Property - see change notes to PolygonGraphics * Fixed types of LabelGraphics - fillColor type changed to Color - outlineColor type changed to Color - outlineWidth type changed to number * Fixed types in EllipseGraphics * Updated PolygonGraphics material property accepts both MaterialProperty and Color types * Updated types in EllipseGraphics --- types/cesium/index.d.ts | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/types/cesium/index.d.ts b/types/cesium/index.d.ts index 6c34023eae..3ea9745ebd 100644 --- a/types/cesium/index.d.ts +++ b/types/cesium/index.d.ts @@ -1935,15 +1935,15 @@ declare namespace Cesium { semiMinorAxis: Property; rotation: Property; show: Property; - material: MaterialProperty; + material: MaterialProperty | Color; height: Property; extrudedHeight: Property; granularity: Property; stRotation: Property; - fill: Property; - outline: Property; - outlineColor: Property; - outlineWidth: Property; + fill: boolean; + outline: boolean; + outlineColor: Color; + outlineWidth: number; numberOfVerticalLines: Property; constructor(options?: { semiMajorAxis?: number; @@ -1951,11 +1951,11 @@ declare namespace Cesium { height?: Property; extrudedHeight?: Property; show?: Property; - fill?: Property; - material?: MaterialProperty; - outline?: Property; - outlineColor?: Property; - outlineWidth?: Property; + fill?: boolean; + material?: MaterialProperty | Color + outline?: boolean; + outlineColor?: Color; + outlineWidth?: number; numberOfVerticalLines?: Property; rotation?: Property; stRotation?: Property; @@ -2207,11 +2207,11 @@ declare namespace Cesium { class LabelGraphics { definitionChanged: Event; text: Property; - font: Property; + font: string; style: Property; - fillColor: Property; - outlineColor: Property; - outlineWidth: Property; + fillColor: Color; + outlineColor: Color; + outlineWidth: number; horizontalOrigin: Property; verticalOrigin: Property; eyeOffset: Property; @@ -2222,11 +2222,11 @@ declare namespace Cesium { pixelOffsetScaleByDistance: Property; constructor(options?: { text?: Property; - font?: Property; + font?: string; style?: Property; - fillColor?: Property; - outlineColor?: Property; - outlineWidth?: Property; + fillColor?: Color; + outlineColor?: Color; + outlineWidth?: number; show?: Property; scale?: Property; horizontalOrigin?: Property; @@ -2362,14 +2362,14 @@ declare namespace Cesium { class PolygonGraphics { definitionChanged: Event; show: Property; - material: MaterialProperty; + material: MaterialProperty | Color; positions: Property; hierarchy: Property; height: Property; extrudedHeight: Property; granularity: Property; stRotation: Property; - fill: Property; + fill: boolean; outline: Property; outlineColor: Color; outlineWidth: Property; @@ -2379,10 +2379,10 @@ declare namespace Cesium { height?: number; extrudedHeight?: Property; show?: Property; - fill?: Property; - material?: MaterialProperty; + fill?: boolean; + material?: MaterialProperty | Color; outline?: boolean; - outlineColor?: Property; + outlineColor?: Color; outlineWidth?: number; stRotation?: Property; granularity?: Property;