mirror of
https://github.com/google/blockly.git
synced 2026-01-05 16:10:09 +01:00
* feat: make renderering methods public or protected * chore: formatting * chore: recommend thrasos more strongly
31 lines
798 B
TypeScript
31 lines
798 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2019 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import * as goog from '../../../closure/goog/goog.js';
|
|
goog.declareModuleId('Blockly.blockRendering.JaggedEdge');
|
|
|
|
import type {ConstantProvider} from '../common/constants.js';
|
|
|
|
import {Measurable} from './base.js';
|
|
import {Types} from './types.js';
|
|
|
|
|
|
/**
|
|
* An object containing information about the space the jagged edge of a
|
|
* collapsed block takes up during rendering.
|
|
*/
|
|
export class JaggedEdge extends Measurable {
|
|
/**
|
|
* @param constants The rendering constants provider.
|
|
*/
|
|
constructor(constants: ConstantProvider) {
|
|
super(constants);
|
|
this.type |= Types.JAGGED_EDGE;
|
|
this.height = this.constants_.JAGGED_TEETH.height;
|
|
this.width = this.constants_.JAGGED_TEETH.width;
|
|
}
|
|
}
|