File

projects/angular-cesium/src/lib/angular-cesium/pipes/pixel-offset/pixel-offset.pipe.ts

Example

<ac-label-desc props="{
position: track.position,
pixelOffset : [-15,20] | pixelOffset,
text: track.name,
font: '15px sans-serif'
}">
</ac-label-desc>

Metadata

Name pixelOffset

Methods

transform
transform(value: any, args?: any)
Parameters :
Name Type Optional
value any No
args any Yes
Returns : any
import { Pipe, PipeTransform } from '@angular/core';

/**
 * @example
 * <ac-label-desc props="{
 *            position: track.position,
 *            pixelOffset : [-15,20] | pixelOffset,
 *            text: track.name,
 *            font: '15px sans-serif'
 *    }">
 * </ac-label-desc>
 */
@Pipe({
  name: 'pixelOffset'
})
export class PixelOffsetPipe implements PipeTransform {

  transform(value: any, args?: any): any {
    return new Cesium.Cartesian2(value[0], value[1]);
  }

}

result-matching ""

    No results matching ""