webmarker-js 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/dist/main.js CHANGED
@@ -1019,7 +1019,7 @@ var WebMarker = (() => {
1019
1019
  const { width, height } = element.getBoundingClientRect();
1020
1020
  Object.assign(boundingBoxElement.style, {
1021
1021
  left: `${x}px`,
1022
- top: `${y}px`,
1022
+ top: `${y + height}px`,
1023
1023
  width: `${width}px`,
1024
1024
  height: `${height}px`
1025
1025
  });
package/dist/module.js CHANGED
@@ -995,7 +995,7 @@ function createBoundingBox(element, style, label, boundingBoxClass) {
995
995
  const { width, height } = element.getBoundingClientRect();
996
996
  Object.assign(boundingBoxElement.style, {
997
997
  left: `${x}px`,
998
- top: `${y}px`,
998
+ top: `${y + height}px`,
999
999
  width: `${width}px`,
1000
1000
  height: `${height}px`
1001
1001
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webmarker-js",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "A library for marking web pages for Set-of-Mark prompting with vision-language models.",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/main.js",
package/src/index.ts CHANGED
@@ -203,7 +203,7 @@ function createBoundingBox(
203
203
  const { width, height } = element.getBoundingClientRect();
204
204
  Object.assign(boundingBoxElement.style, {
205
205
  left: `${x}px`,
206
- top: `${y}px`,
206
+ top: `${y + height}px`,
207
207
  width: `${width}px`,
208
208
  height: `${height}px`,
209
209
  });