mirror of
https://github.com/google/blockly.git
synced 2026-01-07 09:00:11 +01:00
chore: Lint TsDoc. (#6353)
* chore: add linting for tsdoc * chore: don't require types on return * chore: remove redundant fileoverview from ts * chore: change return to returns and add some newlines * chore: remove license tag * chore: don't require params/return docs * chore: remove spurious struct tags * Revert "chore: change return to returns and add some newlines" This reverts commitd6d8656a45. * chore: don't auto-add param names * chore: disable require-param bc it breaks on this * return to returns and add line breaks * chore: configure additional jsdoc rules * chore: run format * Revert "chore: remove license tag" This reverts commit173455588a. * chore: allow license tag format * chore: only require jsdoc on exported items * chore: add missing jsdoc or silence where needed * chore: run format * chore: lint fixes
This commit is contained in:
committed by
GitHub
parent
bb37d1b7aa
commit
037eb59b89
@@ -4,12 +4,9 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Utility functions for positioning UI elements.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Utility functions for positioning UI elements.
|
||||
*
|
||||
* @namespace Blockly.uiPosition
|
||||
*/
|
||||
import * as goog from '../closure/goog/goog.js';
|
||||
@@ -29,6 +26,7 @@ import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
|
||||
/**
|
||||
* Enum for vertical positioning.
|
||||
*
|
||||
* @alias Blockly.uiPosition.verticalPosition
|
||||
* @internal
|
||||
*/
|
||||
@@ -39,6 +37,7 @@ export enum verticalPosition {
|
||||
|
||||
/**
|
||||
* Enum for horizontal positioning.
|
||||
*
|
||||
* @alias Blockly.uiPosition.horizontalPosition
|
||||
* @internal
|
||||
*/
|
||||
@@ -49,6 +48,7 @@ export enum horizontalPosition {
|
||||
|
||||
/**
|
||||
* An object defining a horizontal and vertical positioning.
|
||||
*
|
||||
* @alias Blockly.uiPosition.Position
|
||||
* @internal
|
||||
*/
|
||||
@@ -59,6 +59,7 @@ export interface Position {
|
||||
|
||||
/**
|
||||
* Enum for bump rules to use for dealing with collisions.
|
||||
*
|
||||
* @alias Blockly.uiPosition.bumpDirection
|
||||
* @internal
|
||||
*/
|
||||
@@ -72,13 +73,14 @@ export enum bumpDirection {
|
||||
* element of the specified size given the restraints and locations of the
|
||||
* scrollbars. This method does not take into account any already placed UI
|
||||
* elements.
|
||||
*
|
||||
* @param position The starting horizontal and vertical position.
|
||||
* @param size the size of the UI element to get a start position for.
|
||||
* @param horizontalPadding The horizontal padding to use.
|
||||
* @param verticalPadding The vertical padding to use.
|
||||
* @param metrics The workspace UI metrics.
|
||||
* @param workspace The workspace.
|
||||
* @return The suggested start position.
|
||||
* @returns The suggested start position.
|
||||
* @alias Blockly.uiPosition.getStartPositionRect
|
||||
* @internal
|
||||
*/
|
||||
@@ -122,9 +124,10 @@ export function getStartPositionRect(
|
||||
* the toolbox.
|
||||
* If in horizontal orientation, defaults to the bottom corner. If in vertical
|
||||
* orientation, defaults to the right corner.
|
||||
*
|
||||
* @param workspace The workspace.
|
||||
* @param metrics The workspace metrics.
|
||||
* @return The suggested corner position.
|
||||
* @returns The suggested corner position.
|
||||
* @alias Blockly.uiPosition.getCornerOppositeToolbox
|
||||
* @internal
|
||||
*/
|
||||
@@ -144,13 +147,14 @@ export function getCornerOppositeToolbox(
|
||||
* Returns a position Rect based on a starting position that is bumped
|
||||
* so that it doesn't intersect with any of the provided savedPositions. This
|
||||
* method does not check that the bumped position is still within bounds.
|
||||
*
|
||||
* @param startRect The starting position to use.
|
||||
* @param margin The margin to use between elements when bumping.
|
||||
* @param bumpDir The direction to bump if there is a collision with an existing
|
||||
* UI element.
|
||||
* @param savedPositions List of rectangles that represent the positions of UI
|
||||
* elements already placed.
|
||||
* @return The suggested position rectangle.
|
||||
* @returns The suggested position rectangle.
|
||||
* @alias Blockly.uiPosition.bumpPositionRect
|
||||
* @internal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user