Adjust anchors to which a mark component may have been attached.
352750
def _adjust_anchors(anchor_data, ufo, component):
    """"""

    glyph = ufo[component.baseGlyph]
    t = Transform(*component.transformation)
    for anchor in glyph.anchors:
        # only adjust if this anchor has data and the component also contains
        # the associated mark anchor (e.g. "_top" for "top")
        if anchor.name in anchor_data and any(
            a.name == "_" + anchor.name for a in glyph.anchors
        ):
            anchor_data[anchor.name] = t.transformPoint((anchor.x, anchor.y))
441323
function updateMarkWhenResizing() {
    const helper = getHelper();

    ml.getAll().forEach(marker => {
      helper.updateMarkerWithExtraInfo(marker);
    });

    editor.eventManager.emit('markerUpdated', ml.getAll());
  }
138651
function fixVerticalPositionIE() {
  var container = getContainer();
  var popup = getPopup();
  container.style.removeProperty('align-items');

  if (popup.offsetTop < 0) {
    container.style.alignItems = 'flex-start';
  }
}
922784
function occupySlice(
  targetArr: Array<?string>,
  start: number,
  end: number,
  componentKey: string
): void {
  // eslint-disable-next-line no-plusplus
  for (let ii = start; ii < end; ii++) {
    // eslint-disable-next-line no-param-reassign
    targetArr[ii] = componentKey;
  }
}
248771
def _adjust_object_lists(obj):
    '''
    
    '''
    for subcomp in TEMPLATE_COMPONENT_DEF:
        if subcomp in obj and TEMPLATE_COMPONENT_DEF[subcomp]['adjust']:
            obj[subcomp] = [item[TEMPLATE_COMPONENT_DEF[subcomp]['qidname']] for item in obj[subcomp]]
166334
public void setAnchors(int[] anchors) {
		super.anchors = new ArrayList<Anchor>();
		if (anchors != null) {
			for (int i = 0; i < anchors.length; i++) {
				if (anchors[i] >= 0) {
					addAnchor(i, anchors[i]);
				}
			}
		}
	}
515053
def adjust_locations(ast_node, first_lineno, first_offset):
    

    line_delta = first_lineno - 1

    def _fix(node):
        if 'lineno' in node._attributes:
            lineno = node.lineno
            col = node.col_offset

            # adjust the offset on the first line
            if lineno == 1:
                col += first_offset

            lineno += line_delta

            node.lineno = lineno
            node.col_offset = col

        for child in iter_child_nodes(node):
            _fix(child)

    _fix(ast_node)
773840
private void adjust(ExtendedCisTrans elem) {

        IBond   middle = elem.getFocus();
        IAtom[] ends   = ExtendedCisTrans.findTerminalAtoms(container, middle);
        IBond[] bonds  = elem.getCarriers().toArray(new IBond[2]);

        IAtom left  = ends[0];
        IAtom right = ends[1];

        int p = parity(elem);
        int q = parity(getAtoms(left, bonds[0].getOther(left), right))
                * parity(getAtoms(right, bonds[1].getOther(right), left));

        // configuration is unspecified? then we add an unspecified bond.
        // note: IDoubleBondStereochemistry doesn't indicate this yet
        if (p == 0) {
            for (IBond bond : container.getConnectedBondsList(left))
                bond.setStereo(IBond.Stereo.NONE);
            for (IBond bond : container.getConnectedBondsList(right))
                bond.setStereo(IBond.Stereo.NONE);
            bonds[0].setStereo(IBond.Stereo.UP_OR_DOWN);
            return;
        }

        // configuration is already correct
        if (p == q) return;

        Arrays.fill(visited, false);
        visited[atomToIndex.get(left)] = true;

        if (ringSearch.cyclic(atomToIndex.get(middle.getBegin()),
                              atomToIndex.get(middle.getEnd()))) {
            return;
        }

        for (int w : graph[atomToIndex.get(right)]) {
            if (!visited[w]) reflect(w, middle);
        }
    }
1284325
function fixElementPosition() {
        var style = util.getComputedStyle(element);

        // if the element is not positioned, add position relative so the
        // iframe can be positioned properly
        if (style && style.position === 'static') {
            $(element).css({ position: 'relative' });
        }
    }
46049
def swap_anchor(new_anchor)
      new_anchor.drawing.anchors.delete(new_anchor)
      @anchor.drawing.anchors[@anchor.drawing.anchors.index(@anchor)] = new_anchor
      new_anchor.instance_variable_set "@object", @anchor.object
      @anchor = new_anchor
    end
1102173
function (endpoint, placeholder, _jsPlumb) {
		var stopped = false;
		return {
			drag: function () {
				if (stopped) {
					stopped = false;
					return true;
				}

				if (placeholder.element) {
					var _ui = _jsPlumb.getUIPosition(arguments, _jsPlumb.getZoom());
					jsPlumb.setPosition(placeholder.element, _ui);
					_jsPlumb.repaint(placeholder.element, _ui);
					// always repaint the source endpoint, because only continuous/dynamic anchors cause the endpoint
					// to be repainted, so static anchors need to be told (or the endpoint gets dragged around)
					endpoint.paint({anchorPoint:endpoint.anchor.getCurrentLocation({element:endpoint.element})});
				}
			},
			stopDrag: function () {
				stopped = true;
			}
		};
	}
53496
public void fixateUndistorted() {
		if( controls.size() < 2 )
			throw new RuntimeException("Not enough control points specified.  Found "+controls.size());
		for (int row = 0; row < gridRows; row++) {
			for (int col = 0; col < gridCols; col++) {
				Cache cache = getGrid(row,col);
				cache.weights.resize(controls.size);
				cache.A.resize(controls.size);
				cache.A_s.resize(controls.size());

				float v_x = col;
				float v_y = row;

				computeWeights(cache, v_x, v_y);
				computeAverageP(cache);
				model.computeCache(cache, v_x, v_y);
			}
		}
	}
1014916
def adjustContentsMargins( self ):
        
        anchor = self.anchor()
        mode   = self.currentMode()
        
        # margins for a dialog
        if ( mode == XPopupWidget.Mode.Dialog ):
            self.setContentsMargins(0, 0, 0, 0)
        
        # margins for a top anchor point
        elif ( anchor & (XPopupWidget.Anchor.TopLeft |
                         XPopupWidget.Anchor.TopCenter |
                         XPopupWidget.Anchor.TopRight) ):
            self.setContentsMargins(0, self.popupPadding() + 5, 0, 0)
        
        # margins for a bottom anchor point
        elif ( anchor & (XPopupWidget.Anchor.BottomLeft |
                         XPopupWidget.Anchor.BottomCenter |
                         XPopupWidget.Anchor.BottomRight) ):
            self.setContentsMargins(0, 0, 0, self.popupPadding())
        
        # margins for a left anchor point
        elif ( anchor & (XPopupWidget.Anchor.LeftTop |
                         XPopupWidget.Anchor.LeftCenter |
                         XPopupWidget.Anchor.LeftBottom) ):
            self.setContentsMargins(self.popupPadding(), 0, 0, 0)
        
        # margins for a right anchor point
        else:
            self.setContentsMargins(0, 0, self.popupPadding(), 0)
        
        self.adjustMask()
377039
def adjust(self, ln):
        """"""
        adj_ln = ln
        need_unskipped = 0
        for i in self.skips:
            if i <= ln:
                need_unskipped += 1
            elif adj_ln + need_unskipped < i:
                break
            else:
                need_unskipped -= i - adj_ln - 1
                adj_ln = i
        return adj_ln + need_unskipped
21302
private void adjust(IDoubleBondStereochemistry dbs) {

        IBond db = dbs.getStereoBond();
        IBond[] bonds = dbs.getBonds();

        IAtom left = db.getBegin();
        IAtom right = db.getEnd();

        int p = parity(dbs);
        int q = parity(getAtoms(left, bonds[0].getOther(left), right))
                * parity(getAtoms(right, bonds[1].getOther(right), left));

        // configuration is unspecified? then we add an unspecified bond.
        // note: IDoubleBondStereochemistry doesn't indicate this yet
        if (p == 0) {
            for (IBond bond : container.getConnectedBondsList(left))
                bond.setStereo(IBond.Stereo.NONE);
            for (IBond bond : container.getConnectedBondsList(right))
                bond.setStereo(IBond.Stereo.NONE);
            bonds[0].setStereo(IBond.Stereo.UP_OR_DOWN);
            return;
        }

        // configuration is already correct
        if (p == q) return;

        Arrays.fill(visited, false);
        visited[atomToIndex.get(left)] = true;

        if (ringSearch.cyclic(atomToIndex.get(left), atomToIndex.get(right))) {
            db.setStereo(IBond.Stereo.E_OR_Z);
            return;
        }

        for (int w : graph[atomToIndex.get(right)]) {
            if (!visited[w]) reflect(w, db);
        }
    }
760839
def adjustPitchmarkers(self):
        ''''''
        pitchdiff = self.dist10deg*(self.pitch/10.0)
        rollRotate = mpl.transforms.Affine2D().rotate_deg_around(0.0,-pitchdiff,self.roll)+self.axes.transData
        j=0
        for i in [-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9]:
            width = self.calcPitchMarkerWidth(i)
            self.pitchPatches[j].set_xy((-width/2.0,self.dist10deg*i-(self.thick/2.0)-pitchdiff))
            self.pitchPatches[j].set_transform(rollRotate)
            j+=1
        # Adjust Text Size and rotation
        i=0
        for j in [-9,-6,-3,3,6,9]:
                self.pitchLabelsLeft[i].set_y(j*self.dist10deg-pitchdiff)
                self.pitchLabelsRight[i].set_y(j*self.dist10deg-pitchdiff)
                self.pitchLabelsLeft[i].set_size(self.fontSize)
                self.pitchLabelsRight[i].set_size(self.fontSize)
                self.pitchLabelsLeft[i].set_rotation(self.roll)
                self.pitchLabelsRight[i].set_rotation(self.roll)
                self.pitchLabelsLeft[i].set_transform(rollRotate)
                self.pitchLabelsRight[i].set_transform(rollRotate)
                i += 1
574763
public void removeAnchor(String a) {
        if(anchors == null) {
            anchors = new HashMap<String, Node>();
        }
        anchors.put(a, null);
    }