You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the default code generated by Sketch Panel UI Framework, there is no onOpenDocument function in Panel/Panel.js while we have default onStartup and onSelectionChanged functions.
"handlers" : {
"actions" : {
"Startup" : "onStartup",
"OpenDocument":"onOpenDocument",
"SelectionChanged.finish" : "onSelectionChanged"
}
}
}
]
*/
var onStartup = function(context) {
var testing_FrameworkPath = testing_FrameworkPath || COScript.currentCOScript().env().scriptURL.path().stringByDeletingLastPathComponent().stringByDeletingLastPathComponent();
var testing_Log = testing_Log || log;
(function() {
var mocha = Mocha.sharedRuntime();
var frameworkName = "testing";
var directory = testing_FrameworkPath;
if (mocha.valueForKey(frameworkName)) {
testing_Log("😎 loadFramework: `" + frameworkName + "` already loaded.");
return true;
} else if ([mocha loadFrameworkWithName:frameworkName inDirectory:directory]) {
testing_Log("✅ loadFramework: `" + frameworkName + "` success!");
mocha.setValue_forKey_(true, frameworkName);
return true;
} else {
testing_Log("❌ loadFramework: `" + frameworkName + "` failed!: " + directory + ". Please define testing_FrameworkPath if you're trying to @import in a custom plugin");
return false;
}
})();
};
var onSelectionChanged = function(context) {
testing.onSelectionChanged(context);
};
The text was updated successfully, but these errors were encountered:
In the default code generated by Sketch Panel UI Framework, there is no
onOpenDocument
function in Panel/Panel.js while we have defaultonStartup
andonSelectionChanged
functions.The text was updated successfully, but these errors were encountered: