Go to the previous image in the focused channel in the workspace.
19481
def prev_img_ws(self, ws, loop=True):
        
        channel = self.get_active_channel_ws(ws)
        if channel is None:
            return
        channel.prev_image()
        return True
1073955
def focusin(self, event):
        """"""
        self.old_value = self.get()
        bc = self.style.lookup("TEntry", "bordercolor", ("focus",))
        dc = self.style.lookup("TEntry", "darkcolor", ("focus",))
        lc = self.style.lookup("TEntry", "lightcolor", ("focus",))
        self.style.configure("%s.spinbox.TFrame" % self.frame, bordercolor=bc,
                             darkcolor=dc, lightcolor=lc)
874071
function _selectPhotoForPipe(e){
      
      var img = $('.one-up:visible').find('img')[0].src

      localStorage.imageToPipe = img

      closeOneUp()
      
      window.location = "/instagram/pipe/to"
    }
357985
def go_to_previous_cell(self):
        """"""
        cursor = self.textCursor()
        cur_pos = prev_pos = cursor.position()

        if self.is_cell_separator(cursor):
            # Move to the previous cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            cur_pos = prev_pos = cursor.position()

        while not self.is_cell_separator(cursor):
            # Move to the previous cell or the beginning of the current cell
            cursor.movePosition(QTextCursor.PreviousBlock)
            prev_pos = cur_pos
            cur_pos = cursor.position()
            if cur_pos == prev_pos:
                return

        self.setTextCursor(cursor)
345155
def grab_focus(self):
        """"""
        scene = self.get_scene()
        if scene and scene._focus_sprite != self:
            scene._focus_sprite = self
786085
def prev_window(self, widget, data=None):
        
        self.path_window.hide()
        self.parent.open_window(widget, self.data)
1297087
def focusOutEvent(self, event):
        """"""
        self.focus_changed.emit()
        QPlainTextEdit.focusOutEvent(self, event)
212323
def rowsAboutToBeRemoved(self, parent, start, end):
        """"""
        self._viewIsDirty = True
        super(StimulusView, self).rowsAboutToBeRemoved(parent, start, end)
461763
def draw(self):
        
        # Assumes that self.index has been set earlier (typically in update method)
        # it is used as the index of the current image/endTime/loc
        theImage = self.imagesList[self.index]  # choose the image to show

        if theImage is None:  # if there is no image to show
            return

        if self.visible:
            theOffset = self.offsetsList[self.index]
            theLoc = ((self.loc[0] + theOffset[0]), (self.loc[1] + theOffset[1]))
            self.window.blit(theImage, theLoc)
703015
function(oThis, sDir, bUpdateFocus){
		RoadMapRenderer.scrollToNextStep(oThis, sDir, function(sFirstVisibleNodeId){
			var iIdx = sFirstVisibleNodeId.lastIndexOf("-expandend");
			if (iIdx != -1) {
				sFirstVisibleNodeId = sFirstVisibleNodeId.substring(0, iIdx);
			}
			oThis.setProperty("firstVisibleStep", sFirstVisibleNodeId, true);

			if (bUpdateFocus) {
				refreshFocus(oThis, sDir);
			}
		});
	}
443305
def focus_last_child(self):
        """"""
        w, focuspos = self.get_focus()
        child = self._tree.last_child_position(focuspos)
        if child is not None:
            self.set_focus(child)
612629
def show(self):
        
        if self._prev_contrast is not None:
            self.contrast(self._prev_contrast)
            self._prev_contrast = None
1189107
def focusIn(self, event=None):
        """"""
        try:
            # doScroll returns false if the call was ignored because the
            # last call also came from this widget.  That avoids unwanted
            # scrolls and text selection when the focus moves in and out
            # of the window.
            if self.doScroll(event):
                self.entry.selection_range(0, END) # select all text in widget
            else:
                # restore selection to what it was on the last FocusOut
                if self.lastSelection:
                    self.entry.selection_range(*self.lastSelection)
        except AttributeError:
            pass
1081299
def redo(self):
        
        if self.use_slit:
            image = self.fitsimage.get_image()
            if image != self.cuts_image:
                self.cuts_image = image
                self.build_axes()

        self.replot_all()
1317877
function (image, old) {
        var data1 = old.data,
            data2 = image.data,
            w1 = old.width,
            w2 = image.width,
            px1 = old.globalOffset.x,
            py1 = old.globalOffset.y,
            px2 = image.globalOffset.x,
            py2 = image.globalOffset.y,
            b1 = old.bounds,
            b2 = image.bounds,
            px = Math.min(b1.minX + px1, b2.minX + px2), // global offset for new image (by min in bounds)
            py = Math.min(b1.minY + py1, b2.minY + py2),
            b = { // bounds for new image include all of the pixels [0,0,width,height] (reduce to bounds)
                minX: 0,
                minY: 0,
                maxX: Math.max(b1.maxX + px1, b2.maxX + px2) - px,
                maxY: Math.max(b1.maxY + py1, b2.maxY + py2) - py,
            },
            w = b.maxX + 1, // size for new image
            h = b.maxY + 1,
            i, j, k, k1, k2, len;

        var result = new Uint8Array(w * h);

        // copy all old image
        len = b1.maxX - b1.minX + 1;
        i = (py1 - py + b1.minY) * w + (px1 - px + b1.minX);
        k1 = b1.minY * w1 + b1.minX;
        k2 = b1.maxY * w1 + b1.minX + 1;
        // walk through rows (Y)
        for (k = k1; k < k2; k += w1) {
            result.set(data1.subarray(k, k + len), i); // copy row
            i += w;
        }

        // copy new image (only "black" pixels)
        len = b2.maxX - b2.minX + 1;
        i = (py2 - py + b2.minY) * w + (px2 - px + b2.minX);
        k1 = b2.minY * w2 + b2.minX;
        k2 = b2.maxY * w2 + b2.minX + 1;
        // walk through rows (Y)
        for (k = k1; k < k2; k += w2) {
            // walk through cols (X)
            for (j = 0; j < len; j++) {
                if (data2[k + j] === 1) result[i + j] = 1;
            }
            i += w;
        }

        return {
            data: result,
            width: w,
            height: h,
            bounds: b,
            globalOffset: {
                x: px,
                y: py,
            }
        };
    }
743880
def redraw_now(self, whence=0):
        
        try:
            time_start = time.time()
            self.redraw_data(whence=whence)

            # finally update the window drawable from the offscreen surface
            self.update_image()

            time_done = time.time()
            time_delta = time_start - self.time_last_redraw
            time_elapsed = time_done - time_start
            self.time_last_redraw = time_done
            self.logger.debug(
                "widget '%s' redraw (whence=%d) delta=%.4f elapsed=%.4f sec" % (
                    self.name, whence, time_delta, time_elapsed))

        except Exception as e:
            self.logger.error("Error redrawing image: %s" % (str(e)))
            try:
                # log traceback, if possible
                (type, value, tb) = sys.exc_info()
                tb_str = "".join(traceback.format_tb(tb))
                self.logger.error("Traceback:\n%s" % (tb_str))
            except Exception:
                tb_str = "Traceback information unavailable."
                self.logger.error(tb_str)
27646
function() {
      var cur = select.selectionTopNode(this.container, true), start = cur;
      if (cur === false || !(!cur || cur.isPart || isBR(cur)) || !this.container.firstChild)
        return false;

      while (cur && !isBR(cur)) cur = cur.previousSibling;
      var next = cur ? cur.nextSibling : this.container.firstChild;
      if (next && next != start && next.isPart && hasClass(next, "whitespace"))
        select.focusAfterNode(next, this.container);
      else
        select.focusAfterNode(cur, this.container);

      select.scrollToCursor(this.container);
      return true;
    }