Clarify exportImage option in comments
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2672 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -178,7 +178,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Extension mechanisms must call setCustomHandlers with two functions: opts.open and opts.save
|
// Extension mechanisms may call setCustomHandlers with three functions: opts.open, opts.save, and opts.exportImage
|
||||||
// opts.open's responsibilities are:
|
// opts.open's responsibilities are:
|
||||||
// - invoke a file chooser dialog in 'open' mode
|
// - invoke a file chooser dialog in 'open' mode
|
||||||
// - let user pick a SVG file
|
// - let user pick a SVG file
|
||||||
@@ -187,6 +187,12 @@
|
|||||||
// - accept the string contents of the current document
|
// - accept the string contents of the current document
|
||||||
// - invoke a file chooser dialog in 'save' mode
|
// - invoke a file chooser dialog in 'save' mode
|
||||||
// - save the file to location chosen by the user
|
// - save the file to location chosen by the user
|
||||||
|
// opts.exportImage's responsibilities (with regard to the object it is supplied in its 2nd argument) are:
|
||||||
|
// - inform user of any issues supplied via the "issues" property
|
||||||
|
// - convert the "svg" property SVG string into an image for export;
|
||||||
|
// utilize the properties "type" (currently 'PNG', 'JPEG', 'BMP',
|
||||||
|
// 'WEBP'), "mimeType", and "quality" (for 'JPEG' and 'WEBP'
|
||||||
|
// types) to determine the proper output.
|
||||||
Editor.setCustomHandlers = function(opts) {
|
Editor.setCustomHandlers = function(opts) {
|
||||||
Editor.ready(function() {
|
Editor.ready(function() {
|
||||||
if (opts.open) {
|
if (opts.open) {
|
||||||
|
|||||||
Reference in New Issue
Block a user