| 52 | * one or multiple `cartesian2d`s, which are `CoordinateSystem`s. |
| 53 | */ |
| 54 | export interface CoordinateSystemMaster { |
| 55 | |
| 56 | // FIXME current dimensions must be string[]. |
| 57 | // check and unify the definition. |
| 58 | // Should be the same as its coordinateSystemCreator. |
| 59 | dimensions: DimensionName[]; |
| 60 | |
| 61 | model?: ComponentModel; |
| 62 | |
| 63 | // Injected if required. |
| 64 | boxCoordinateSystem?: CoordinateSystem; |
| 65 | |
| 66 | update?: (ecModel: GlobalModel, api: ExtensionAPI) => void; |
| 67 | |
| 68 | // This methods is also responsible for determining whether this |
| 69 | // coordinate system is applicable to the given `finder`. |
| 70 | // Each coordinate system will be tried, until one returns non- |
| 71 | // null/undefined value. |
| 72 | // Aslo support |
| 73 | // const resultNumber = convertToPixel({someAxis: 0}, number); |
| 74 | convertToPixel?( |
| 75 | ecModel: GlobalModel, |
| 76 | finder: ParsedModelFinder, |
| 77 | value: Parameters<CoordinateSystem['dataToPoint']>[0], |
| 78 | opt?: unknown |
| 79 | ): ReturnType<CoordinateSystem['dataToPoint']> | number | NullUndefined; |
| 80 | |
| 81 | // This methods is also responsible for determining whether this |
| 82 | // coordinate system is applicable to the given `finder`. |
| 83 | // Each coordinate system will be tried, until one returns non- |
| 84 | // null/undefined value. |
| 85 | convertToLayout?( |
| 86 | ecModel: GlobalModel, |
| 87 | finder: ParsedModelFinder, |
| 88 | value: Parameters<NonNullable<CoordinateSystem['dataToLayout']>>[0], |
| 89 | opt?: unknown |
| 90 | ): ReturnType<NonNullable<CoordinateSystem['dataToLayout']>> | NullUndefined; |
| 91 | |
| 92 | // This methods is also responsible for determining whether this |
| 93 | // coordinate system is applicable to the given `finder`. |
| 94 | // Each coordinate system will be tried, until one returns non- |
| 95 | // null/undefined value. |
| 96 | convertFromPixel?( |
| 97 | ecModel: GlobalModel, |
| 98 | finder: ParsedModelFinder, |
| 99 | pixelValue: Parameters<NonNullable<CoordinateSystem['pointToData']>>[0], |
| 100 | opt?: unknown |
| 101 | ): ReturnType<NonNullable<CoordinateSystem['pointToData']>> | NullUndefined; |
| 102 | |
| 103 | // @param point Point in global pixel coordinate system. |
| 104 | // The signature of this method should be the same as `CoordinateSystemExecutive` |
| 105 | containPoint(point: number[]): boolean; |
| 106 | |
| 107 | // Must be implemented when `axisPointerEnabled` is `true`. |
| 108 | getAxes?: () => Axis[]; |
| 109 | |
| 110 | axisPointerEnabled?: boolean; |
| 111 |
no outgoing calls
no test coverage detected
searching dependent graphs…