Update an element, including it's properties
327019
def _update_element(name, element_type, data, server=None):
    '''
    
    '''
    # Urlencode the name (names may have slashes)
    name = quote(name, safe='')

    # Update properties first
    if 'properties' in data:
        properties = []
        for key, value in data['properties'].items():
            properties.append({'name': key, 'value': value})
        _api_post('{0}/{1}/property'.format(element_type, name), properties, server)
        del data['properties']

        # If the element only contained properties
        if not data:
            return unquote(name)

    # Get the current data then merge updated data into it
    update_data = _get_element(name, element_type, server, with_properties=False)
    if update_data:
        update_data.update(data)
    else:
        __context__['retcode'] = salt.defaults.exitcodes.SALT_BUILD_FAIL
        raise CommandExecutionError('Cannot update {0}'.format(name))

    # Finally, update the element
    _api_post('{0}/{1}'.format(element_type, name), _clean_data(update_data), server)
    return unquote(name)
1366854
protected function updateClassAttribute()
    {
        $this->classesString = implode(' ', $this->classes);

        $this->element->setAttribute('class', $this->classesString);
    }
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)
561707
function componentUpdate(tag, data, expressions) {
      var __ = tag.__;
      var nextOpts = {};
      var canTrigger = tag.isMounted && !__.skipAnonymous;

      // inherit properties from the parent tag
      if (__.isAnonymous && __.parent) { extend(tag, __.parent); }
      extend(tag, data);

      updateOpts.apply(tag, [__.isLoop, __.parent, __.isAnonymous, nextOpts, __.instAttrs]);

      if (
        canTrigger &&
        tag.isMounted &&
        isFunction$1(tag.shouldUpdate) && !tag.shouldUpdate(data, nextOpts)
      ) {
        return tag
      }

      extend(tag.opts, nextOpts);

      if (canTrigger) { tag.trigger('update', data); }
      update.call(tag, expressions);
      if (canTrigger) { tag.trigger('updated'); }

      return tag
    }
690027
function(element, options)
    {
        // Make sure the transform property is an object
        if(typeof element.transform != "object")
        {
            element.transform = {};
        }

        // If we have an object of options
        if(typeof options[0] == "object")
        {
            // Loop through object properties and save their values
            var keys = Object.keys(options[0]);

            keys.forEach(function(property)
            {
                element.transform[property] = options[0][property];
            });
        }
        
        // Otherwise, loop through all of the options to find values
        else
        {
            var property = options[0];
            var args = [];

            for(var i = 1, l = options.length; i < l; i++)
            {
                args.push(options[i]);
            }

            element.transform[property] = args;
        }
    }
1294622
def update(self, e=None, **f):
        """"""

        # Handle e first
        if e is not None:
            if hasattr(e, 'keys'):
                for k in e:
                    self[k.title()] = e[k]
            else:
                for (k, v) in e:
                    self[k.title()] = v

        # Now handle f
        if len(f):
            for k in f:
                self[k.title()] = f[k]
921417
function update() {
      if (!hoveredNode)
        return;

      var embedSettings = self.settings.embedObjects({
            prefix: prefix
          });

      // Deleting element before update
      self.domElements.groups.hovers.removeChild(
        self.domElements.hovers[hoveredNode.id]
      );
      delete self.domElements.hovers[hoveredNode.id];

      var hover = (renderers[hoveredNode.type] || renderers.def).create(
        hoveredNode,
        self.domElements.nodes[hoveredNode.id],
        self.measurementCanvas,
        embedSettings
      );

      self.domElements.hovers[hoveredNode.id] = hover;

      // Inserting the hover in the dom
      self.domElements.groups.hovers.appendChild(hover);
    }
1274573
def add(self, element):
        """"""
        key = self._transform(element)
        if key not in self._elements:
            self._elements[key] = element
311136
protected function updateStyleAttribute()
    {
        $this->styleString = $this->buildStyleString();

        $this->element->setAttribute('style', $this->styleString);
    }
824583
function update(parent$, newValue) {
  parent$.value = newValue;
  notifyListeners(parent$.listeners, newValue);
}
585431
function() {
		edbml.Update.prototype.update.call(this);
		var element = this.element();
		if (this._beforeUpdate(element)) {
			this._update(element);
			this._afterUpdate(element);
			this._report();
		}
	}
727769
function updateDescriptions( el ) {
		var i;
		for ( i = 0; i < el.length; i++ ) {
			el[ i ].innerHTML = updateDescription( el[ i ].innerHTML );
		}
	}
9900
def update(self):
        """"""
        self.json = c.get_document(self.uri.did).json()
        self.e_list = c.element_list(self.uri.as_dict()).json()
883253
function () {

            var pos = Dom.getXY(this.element);

            this.cfg.setProperty("x", pos[0], true);
            this.cfg.setProperty("y", pos[1], true);
            this.cfg.setProperty("xy", pos, true);

        }
963956
function updateOptions( $elem, prev, curr ) {
        var bselect = _callMethod( $elem, "element" );

        $.each( prev, function(key, val) {
            if ( curr[ key ] !== val ) {
                if ( key === "size" ) {
                    var sizes = $.map( bootstrapButtonSizes.slice( 0 ), function( size ) {
                        return "bselect-" + size;
                    }).join( " " );

                    bselect.removeClass( sizes );
                    if ( bootstrapButtonSizes.indexOf( curr.size ) > -1 ) {
                        bselect.addClass( "bselect-" + curr.size );
                    }
                }
            }
        });
    }
336855
def update_property(self, name, old_value, new_value):
        # type: (str, Any, Any) -> None
        
        with self._lock:
            self.__safe_handlers_callback(
                "on_property_change", name, old_value, new_value
            )
1207112
function (name){
	this._elementTitle = name;
	var th = "";
	var t1 = "";
	var t2 = "";

	this._inpRow = ["<th>New Property</th>", "<td><input id='current-header' type='text' placeholder='Name'></td><td id='prop-feedback'></td>", "<td><input id='current-default' type='text' placeholder='default value'></td><td><input type='button' value='+' onclick='NewProperty()' /></td>"];

	this._Row = function (prop){

		th += this._inpRow[0];
		t1 += this._inpRow[1];
		t2 += this._inpRow[2];
	};
	this._AdvRow = function (prop){
		var newRow = ["<th>" + prop + "</th>", "<td></td>", "<td></td>"];
		th = newRow[0] + th;
		t1 = newRow[1] + t1;
		t2 = newRow[2] + t2;
	};

	this._Table = function (){
		var table = "<article id='element-" + this._elementTitle + "' class='element'><h2>" + this._elementTitle + "</h2><table id='new-element'><tr>" + th + "</tr><tr>" + t1 + "</tr><tr>" + t2 + "</tr></table><input type='button' value='Confirm' onclick='SendElement()'/></article>";
		return table;
	};
	this._append = "<form class='appendor' method='post' enctype='multipart/form-data' action='./modify/add/" + this._elementTitle + "'></form>";

	this._props = [];
	this._packet = {
		'_title' : name,
		'_fresh' : true
	};

	console.log("new element");
}