mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-09-07 05:30:31 +00:00
Rename Raster to Bitmap
This commit is contained in:
parent
c5ed54cbd2
commit
5a6815dd91
9 changed files with 26 additions and 28 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
TriggerCopyToClipboardBlobUrl,
|
||||
TriggerFetchAndOpenDocument,
|
||||
TriggerDownloadBlobUrl,
|
||||
TriggerDownloadRaster,
|
||||
TriggerDownloadImage,
|
||||
TriggerDownloadTextFile,
|
||||
TriggerImport,
|
||||
TriggerOpenDocument,
|
||||
|
@ -83,8 +83,8 @@ export function createPortfolioState(editor: Editor) {
|
|||
editor.subscriptions.subscribeJsMessage(TriggerCopyToClipboardBlobUrl, (triggerDownloadBlobUrl) => {
|
||||
copyToClipboardFileURL(triggerDownloadBlobUrl.blobUrl);
|
||||
});
|
||||
editor.subscriptions.subscribeJsMessage(TriggerDownloadRaster, async (triggerRasterDownload) => {
|
||||
const { svg, name, mime, size } = triggerRasterDownload;
|
||||
editor.subscriptions.subscribeJsMessage(TriggerDownloadImage, async (triggerDownloadImage) => {
|
||||
const { svg, name, mime, size } = triggerDownloadImage;
|
||||
|
||||
// Fill the canvas with white if it'll be a JPEG (which does not support transparency and defaults to black)
|
||||
const backgroundColor = mime.endsWith("jpeg") ? "white" : undefined;
|
||||
|
|
|
@ -541,7 +541,7 @@ export class TriggerDownloadBlobUrl extends JsMessage {
|
|||
readonly blobUrl!: string;
|
||||
}
|
||||
|
||||
export class TriggerDownloadRaster extends JsMessage {
|
||||
export class TriggerDownloadImage extends JsMessage {
|
||||
readonly svg!: string;
|
||||
|
||||
readonly name!: string;
|
||||
|
@ -1402,7 +1402,7 @@ export const messageMakers: Record<string, MessageMaker> = {
|
|||
TriggerCopyToClipboardBlobUrl,
|
||||
TriggerFetchAndOpenDocument,
|
||||
TriggerDownloadBlobUrl,
|
||||
TriggerDownloadRaster,
|
||||
TriggerDownloadImage,
|
||||
TriggerDownloadTextFile,
|
||||
TriggerFontLoad,
|
||||
TriggerGraphViewOverlay,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue