get-css-translated-position
Get position of DOM elements positioned with CSS translate
Last updated 5 years ago by henrikjoreteg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install get-css-translated-position 
SYNC missed versions from official npm registry.

get-css-translated-position

Get position of DOM elements positioned with CSS translate

install

npm install get-css-translated-position

example

var translatedPosition = require('get-css-translated-position')

// by default it doesn't account for element's offset
// on the page, just the value of its translation
translatedPosition(el) //=> {x: 5, y: 47}

// if you want it's position on the page pass the following option
translatedPosition(el, {includePageOffset: true}) //=> {x: 15, y: 147}

credits

If you like this follow @HenrikJoreteg on twitter.

license

MIT

Current Tags

  • 1.0.1                                ...           latest (5 years ago)

2 Versions

  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |