-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d7b961d
commit 267ff79
Showing
4 changed files
with
98 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/@dcl/inspector/src/components/EntityInspector/SceneInspector/SceneInspector.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.Container.Scene .content svg { | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/@dcl/inspector/src/components/EntityInspector/SceneInspector/utils.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { getCoordinatesBetweenPoints } from './utils' | ||
import { Coords } from '../../../lib/utils/layout' | ||
|
||
describe('getCoordinatesBetweenPoints', () => { | ||
it('should return an array of coordinates between two points', () => { | ||
const pointA: Coords = { x: 0, y: 0 } | ||
const pointB: Coords = { x: 2, y: 2 } | ||
|
||
const result = getCoordinatesBetweenPoints(pointA, pointB) | ||
|
||
expect(result).toEqual([ | ||
{ x: 0, y: 0 }, | ||
{ x: 0, y: 1 }, | ||
{ x: 0, y: 2 }, | ||
{ x: 1, y: 0 }, | ||
{ x: 1, y: 1 }, | ||
{ x: 1, y: 2 }, | ||
{ x: 2, y: 0 }, | ||
{ x: 2, y: 1 }, | ||
{ x: 2, y: 2 } | ||
]) | ||
}) | ||
|
||
it('should return an array with a single coordinate when both points are the same', () => { | ||
const pointA: Coords = { x: 3, y: 3 } | ||
const pointB: Coords = { x: 3, y: 3 } | ||
|
||
const result = getCoordinatesBetweenPoints(pointA, pointB) | ||
|
||
expect(result).toEqual([{ x: 3, y: 3 }]) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters