MCPcopy Create free account
hub / github.com/esengine/esengine / updatePivotOffset

Method updatePivotOffset

packages/fairygui/src/core/GObject.ts:416–427  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414 }
415
416 protected updatePivotOffset(): void {
417 if (this._displayObject && (this._pivotX !== 0 || this._pivotY !== 0)) {
418 const px = this._pivotX * this._width;
419 const py = this._pivotY * this._height;
420 // Calculate offset after applying transform
421 this._pivotOffsetX = px;
422 this._pivotOffsetY = py;
423 } else {
424 this._pivotOffsetX = 0;
425 this._pivotOffsetY = 0;
426 }
427 }
428
429 protected applyPivot(): void {
430 if (this._pivotX !== 0 || this._pivotY !== 0) {

Callers 3

setSizeMethod · 0.95
setPivotMethod · 0.95
applyPivotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected