2018-04-16 20:50:12 +02:00
|
|
|
/// <reference path="./sensorView.ts" />
|
2017-12-18 22:04:17 +01:00
|
|
|
|
|
|
|
namespace pxsim.visuals {
|
2018-04-16 20:50:12 +02:00
|
|
|
export class GyroSensorView extends SensorView implements LayoutElement {
|
2017-12-18 22:04:17 +01:00
|
|
|
|
|
|
|
constructor(port: number) {
|
|
|
|
super(GYRO_SVG, "gyro", NodeType.GyroSensor, port);
|
|
|
|
}
|
|
|
|
|
2018-03-28 22:36:52 +02:00
|
|
|
protected optimizeForLightMode() {
|
|
|
|
(this.content.getElementById(this.normalizeId('gyro_white_1')) as SVGElement).style.fill = '#7B7B7B';
|
|
|
|
(this.content.getElementById(this.normalizeId('gyro_white_small_path')) as SVGElement).style.fill = '#7B7B7B';
|
|
|
|
}
|
|
|
|
|
2017-12-18 22:04:17 +01:00
|
|
|
public getPaddingRatio() {
|
2017-12-27 08:19:04 +01:00
|
|
|
return 0.3;
|
2017-12-18 22:04:17 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|