Toggle wrap mode
344899
def toggle_wrap_mode(self, checked):
        """"""
        self.plain_text.editor.toggle_wrap_mode(checked)
        self.set_option('wrap', checked)
124916
function _closePanes() {
            toggledPanes = {};

            if (lxSelect.choicesViewSize === 'large') {
                if (angular.isDefined(lxSelect.choices) && lxSelect.choices !== null) {
                    lxSelect.panes = [lxSelect.choices];
                } else {
                    lxSelect.panes = [];
                }
            } else {
                if (angular.isDefined(lxSelect.choices) && lxSelect.choices !== null) {
                    lxSelect.openedPanes = [lxSelect.choices];
                } else {
                    lxSelect.openedPanes = [];
                }
            }
        }
1041702
function toggleSlideShowMode() {
  const streams = room.remoteStreams;
  const cb = (evt) => {
    console.log('SlideShowMode changed', evt);
  };
  slideShowMode = !slideShowMode;
  streams.forEach((stream) => {
    if (localStream.getID() !== stream.getID()) {
      console.log('Updating config');
      stream.updateConfiguration({ slideShowMode }, cb);
    }
  });
}
826767
function toggleState(element, state) {
    setAttribute(element, `aria-${state}`, !stringToBoolean(getAttribute(element, `aria-${state}`)));
}
652998
def toggle_buttons(self):
        """"""
        all_types = self.all_types.get_value()
        self.idx_evt_type.setEnabled(not all_types)
226801
def toggleCollapseAfter( self ):
        
        if ( self.isCollapsed() ):
            self.uncollapse()
        else:
            self.collapse( XSplitterHandle.CollapseDirection.After )
733705
function toggleSubNav(e) {
    $(e.currentTarget).next().toggleClass('hidden');
    $(e.currentTarget).find('.glyphicon').toggleClass('glyphicon-plus glyphicon-minus');
}
1231842
def toggle_shells(command, enable):
    """"""
    selection = list(selected_shells(command))
    if command and command != '*' and selection:
        for i in selection:
            if i.state != remote_dispatcher.STATE_DEAD and i.enabled != enable:
                break
        else:
            toggle_shells('*', not enable)

    for i in selection:
        if i.state != remote_dispatcher.STATE_DEAD:
            i.set_enabled(enable)
333449
def toggle(self, section, option):
  """"""
  self.set(section, option, not self.get(section, option))
510736
def set_toggle_mask(self, mode_mask, rfm=1):
        
        cmds = {1: 'm', 2: 'M'}
        self._write_cmd('{}{}'.format(mode_mask, cmds[rfm]))
399641
function toggleControls () {
      controlsElement.style.display = controlsElement.style.display == "none" ? "block" : "none";
      if (controlsElement.style.display === "block") {
        playButton.focus();
      }
    }
1195951
def toggleWidth(self, width):
        ''
        if self.width != width:
            self.width = width
        else:
            self.width = int(options.default_width)
12781
private void toggle() {
        if (toggle.checked) {
            element().classList.add("completed");
        } else {
            element().classList.remove("completed");
        }
        repository().complete(item(), toggle.checked);
        application().update();
    }
705073
function togglify(win, opts) {
	// extend options for toggle window
	opts = oassign({
		animation: 'hide'
	}, opts);

	win._toggleAction = new ToggleAnimation(win, opts.animation);

	// patch toggle function to window
	win.toggle = function () {
		if (this.isVisible() && this.isFocused()) {
			this._toggleAction.hide();
		} else if (this.isVisible() && !this.isFocused()) {
			this._toggleAction.focus();
		} else if (this.isMinimized() || !this.isVisible()) {
			this._toggleAction.restore();
		}
	};

	// bind event for default action
	win.on('blur', function () {
		if (win.isVisible()) {
			this._toggleAction.blur();
		}
	});

	return win;
}
2
function() {
        var options = this.options;

        if (options.hideOthers) {
            this.secondary.each(function() {
                var sidebar = $(this);

                if (sidebar.hasClass('is-expanded')) {
                    sidebar.toolkit('offCanvas', 'hide');
                }
            });
        }

        this.fireEvent('showing');

        this.container.addClass('move-' + this.opposite);

        this.element
            .reveal()
            .addClass('is-expanded')
            .aria('expanded', true);

        if (options.stopScroll) {
            $('body').addClass('no-scroll');
        }

        this.fireEvent('shown');
    }
316105
function toggleDefaultBehavior(element, css_props, toggle) {
    if(!css_props || !element || !element.style) {
      return;
    }

    // with css properties for modern browsers
    Utils.each(['webkit', 'moz', 'Moz', 'ms', 'o', ''], function setStyle(vendor) {
      Utils.each(css_props, function(value, prop) {
          // vender prefix at the property
          if(vendor) {
            prop = vendor + prop.substring(0, 1).toUpperCase() + prop.substring(1);
          }
          // set the style
          if(prop in element.style) {
            element.style[prop] = !toggle && value;
          }
      });
    });

    var false_fn = function(){ return false; };

    // also the disable onselectstart
    if(css_props.userSelect == 'none') {
      element.onselectstart = !toggle && false_fn;
    }
    // and disable ondragstart
    if(css_props.userDrag == 'none') {
      element.ondragstart = !toggle && false_fn;
    }
  }
807846
def mode_toggle(self, mode: str) -> bool:
        """"""
        head = helpers.req_headers(self.manager)
        body = helpers.req_body(self.manager, 'devicestatus')
        body['uuid'] = self.uuid
        if mode != body['mode'] and mode in ['sleep', 'auto', 'manual']:
            body['mode'] = mode
            if mode == 'manual':
                body['level'] = 1

            r, _ = helpers.call_api('/131airPurifier/v1/device/updateMode',
                                    'put', json=body, headers=head)

            if r is not None and helpers.check_response(r, 'airpur_status'):
                self.details['mode'] = mode
                return True

        return False