Skip to content

“use strict”;

var positionImage = function positionImage(imageEl) {
var imageDimensions = imageEl.dataset.imageDimensions.split(‘x’);
var originalWidth = imageDimensions[0];
var originalHeight = imageDimensions[1];
var focalPoint = imageEl.dataset.imageFocalPoint.split(‘,’);
var focalPointX = focalPoint[0];
var focalPointY = focalPoint[1];
var parentNode = imageEl.parentNode;

var scale = function () {
var imageRatio = originalWidth / originalHeight;
var parentClientSize = {
height: parentNode.clientHeight,
width: parentNode.clientWidth
var parentRatio = parentClientSize.width / parentClientSize.height;

if (imageRatio > parentRatio) {
return parentClientSize.height / originalHeight;

return parentClientSize.width / originalWidth;

var getRelativeOffset = function getRelativeOffset() {
var targetWidth = Math.ceil(originalWidth * scale);
var targetHeight = Math.ceil(originalHeight * scale);
var parentDimensionWidth = parentNode.offsetWidth;
var parentDimensionHeight = parentNode.offsetHeight;
var overflowWidth = targetWidth – parentDimensionWidth;
var overflowHeight = targetHeight – parentDimensionHeight;
var valueX;

if (overflowWidth === 0) {
valueX = focalPointX;
} else {
valueX = Math.max(Math.min(targetWidth * focalPointX – parentDimensionWidth * 0.5, overflowWidth), 0) / overflowWidth;

var valueY;

if (overflowHeight === 0) {
valueY = focalPointY;
} else {
valueY = Math.max(Math.min(targetHeight * focalPointY – parentDimensionHeight * 0.5, overflowHeight), 0) / overflowHeight;

return {
valueX: valueX,
valueY: valueY

var relativeOffset = getRelativeOffset();
var valueX = relativeOffset.valueX;
var valueY = relativeOffset.valueY; = “”.concat(valueX * 100, “% “).concat(valueY * 100, “%”);

Join the Grassroots Law Texas Team

We’re building a new team in Texas, but it needs YOU. This community will organize and connect to take the fight for justice to every state and local official in Texas and do everything in our power to end police violence and mass incarceration. 

We love Texas, but it’s ground zero for so much that needs to change. Every single day in Texas so many people are wrongfully arrested, convicted, beaten, and killed by the law enforcement community there. In Texas, their names are Botham Jean, Atatiana Jefferson, Damian Daniels, DJ Tarver, and Rodney Reed. 

But together, we can make real progress. You don’t have to be experienced to join the GLP Texas team. We need ALL HANDS ON DECK. You will be joining our staff of grassroots organizers, legal experts, and your fellow Texans, to elect good people, replace the most problematic ones, and create new policies that address the root cause of these injustices. 

Texas is a big state. Together, we will apply our skills and resources to address the most egregious cases and to mount massive campaigns to protect one another, and advance social justice initiatives quickly and effectively. 

This is an open invitation to everyone. Please invite everybody you know to join you. Once you sign up, you’ll get an email with next steps to get connected with the community. Thank you for your support and we can’t wait to work with you!


Name *

actionkit.forms.contextRoot = ‘’;