|
@@ -2079,7 +2079,7 @@ var clone,caret;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
return $core.withContext(function($ctx1) {
|
|
return $core.withContext(function($ctx1) {
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
-var $1,$2;
|
|
|
|
|
|
+var $1;
|
|
clone=$recv($recv(anElement)._asJQuery())._clone();
|
|
clone=$recv($recv(anElement)._asJQuery())._clone();
|
|
$1=$recv($globals.TagBrush)._fromJQuery_canvas_(clone,self);
|
|
$1=$recv($globals.TagBrush)._fromJQuery_canvas_(clone,self);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -2087,11 +2087,11 @@ $ctx1.sendIdx["fromJQuery:canvas:"]=1;
|
|
//>>excludeEnd("ctx");
|
|
//>>excludeEnd("ctx");
|
|
self._with_($1);
|
|
self._with_($1);
|
|
caret=$recv(clone)._find_("[data-snippet=\x22*\x22]");
|
|
caret=$recv(clone)._find_("[data-snippet=\x22*\x22]");
|
|
-$2=$recv($recv(caret)._toArray())._isEmpty();
|
|
|
|
-if($core.assert($2)){
|
|
|
|
|
|
+$recv($recv(caret)._toArray())._ifEmpty_((function(){
|
|
caret=clone;
|
|
caret=clone;
|
|
-caret;
|
|
|
|
-};
|
|
|
|
|
|
+return caret;
|
|
|
|
+
|
|
|
|
+}));
|
|
return $recv($globals.TagBrush)._fromJQuery_canvas_($recv(caret)._removeAttr_("data-snippet"),self);
|
|
return $recv($globals.TagBrush)._fromJQuery_canvas_($recv(caret)._removeAttr_("data-snippet"),self);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
}, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},$globals.HTMLCanvas)});
|
|
}, function($ctx1) {$ctx1.fill(self,"snippet:",{anElement:anElement,clone:clone,caret:caret},$globals.HTMLCanvas)});
|
|
@@ -2099,10 +2099,10 @@ return $recv($globals.TagBrush)._fromJQuery_canvas_($recv(caret)._removeAttr_("d
|
|
},
|
|
},
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
args: ["anElement"],
|
|
args: ["anElement"],
|
|
-source: "snippet: anElement\x0a\x09\x22Adds clone of anElement, finds [data-snippet=\x22\x22*\x22\x22] subelement\x0a\x09and returns TagBrush as if that subelement was just added.\x0a\x09\x0a\x09Rarely needed to use directly, use `html foo` dynamically installed method\x0a\x09for a snippet named foo.\x22\x0a\x09\x0a\x09| clone caret |\x0a\x09\x0a\x09clone := anElement asJQuery clone.\x0a\x09self with: (TagBrush fromJQuery: clone canvas: self).\x0a\x09caret := clone find: '[data-snippet=\x22*\x22]'.\x0a\x09caret toArray isEmpty ifTrue: [ caret := clone ].\x0a\x09^ TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self",
|
|
|
|
|
|
+source: "snippet: anElement\x0a\x09\x22Adds clone of anElement, finds [data-snippet=\x22\x22*\x22\x22] subelement\x0a\x09and returns TagBrush as if that subelement was just added.\x0a\x09\x0a\x09Rarely needed to use directly, use `html foo` dynamically installed method\x0a\x09for a snippet named foo.\x22\x0a\x09\x0a\x09| clone caret |\x0a\x09\x0a\x09clone := anElement asJQuery clone.\x0a\x09self with: (TagBrush fromJQuery: clone canvas: self).\x0a\x09caret := clone find: '[data-snippet=\x22*\x22]'.\x0a\x09caret toArray ifEmpty: [ caret := clone ].\x0a\x09^ TagBrush fromJQuery: (caret removeAttr: 'data-snippet') canvas: self",
|
|
referencedClasses: ["TagBrush"],
|
|
referencedClasses: ["TagBrush"],
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
-messageSends: ["clone", "asJQuery", "with:", "fromJQuery:canvas:", "find:", "ifTrue:", "isEmpty", "toArray", "removeAttr:"]
|
|
|
|
|
|
+messageSends: ["clone", "asJQuery", "with:", "fromJQuery:canvas:", "find:", "ifEmpty:", "toArray", "removeAttr:"]
|
|
}),
|
|
}),
|
|
$globals.HTMLCanvas);
|
|
$globals.HTMLCanvas);
|
|
|
|
|