Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/componentsguide/sources/vector/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ ol-source-vector can be used together with ol-vector-layer to draw any vector da

[[toc]]

## Demo

<script setup>
import GeomPoint from "@demos/GeomPoint.vue"
import VectorSourceDemo1 from "@demos/VectorSourceDemo1.vue"
Expand Down
229 changes: 201 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@
"test:e2e:debug": "npm run test:e2e -- --debug --workers=1",
"test:e2e:trace": "npm run test:e2e -- --trace on",
"test:e2e:report": "playwright show-report",
"coverage": "vitest run --coverage"
"coverage": "vitest run --coverage",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"@turf/buffer": "^7.0.0",
Expand Down Expand Up @@ -130,6 +131,7 @@
"vite": "^5.3.5",
"vite-plugin-dts": "^3.9.1",
"vitepress": "1.3.1",
"vitest": "2.0.5"
"vitest": "2.0.5",
"vue-tsc": "^2.1.10"
}
}
15 changes: 8 additions & 7 deletions src/components/animations/AnimationCommonProps.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import { easeOut } from "ol/easing";

export type AnimationCommonProps = {
duration?: number;
revers?: boolean;
repeat?: number;
easing?: (t: number) => number;
};
import { type Options } from "ol-ext/featureanimation/FeatureAnimation";
import type { KeysMatching } from "@/types";

export const animationCommonDefaultProps = {
duration: 1000,
revers: false,
repeat: 0,
easing: easeOut,
};

export function useDefaults<T extends Options>(
overrides?: T,
): Omit<T, KeysMatching<T, object>> {
return { ...animationCommonDefaultProps, ...overrides } as T;
}
Loading