Skip to main content
Home
It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
52%
Published
a year ago (0.2.1)

Development

  • deno task build

Deployment

Use Gitflow.

  • deno task bundle
  • deno publish

Usage Example

<div class="container mx-auto">
 <div class="w-full js-container-anchor"></div>
 <div class="w-10/12 ml-auto">
   <div class="w-full js-image-anchor"></div>
   <img src="https://placehold.co/300" class="w-full h-auto js-image"/>
 </div>
</div>
new ImageOffsetter({
  containerAnchor: document.querySelector('.js-container-anchor'),
  imageAnchor: document.querySelector('.js-image-anchor'),
  image: document.querySelector('.js-image'),

  // pull: 'left',
  // on: {
  //   offsetChange: (offset) => console.log(offset)
  // },
  // maxWindowWidth: window.innerWidth
})

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";
or

Import directly with a jsr specifier

import * as image_offsetter from "jsr:@hubton/image-offsetter";

Add Package

pnpm i jsr:@hubton/image-offsetter
or (using pnpm 10.8 or older)
pnpm dlx jsr add @hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";

Add Package

yarn add jsr:@hubton/image-offsetter
or (using Yarn 4.8 or older)
yarn dlx jsr add @hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";

Add Package

vlt install jsr:@hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";

Add Package

npx jsr add @hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";

Add Package

bunx jsr add @hubton/image-offsetter

Import symbol

import * as image_offsetter from "@hubton/image-offsetter";