27 files + 884 − 114 Inline Compare changes Side-by-side Inline Show whitespace changes Files 27 frontend/src/assets/previews/nakopneme_basic_photo_banner_fz.png 0 → 100644 +49.1 KiB 49.15 KiB frontend/src/templates.js +13 −0 Original line number Diff line number Diff line import basicPhotoBannerImage from "./assets/previews/basic_photo_banner.png"; import nakopnemeBasicPhotoBannerImage from "./assets/previews/nakopneme_basic_photo_banner.png"; import nakopnemeBasicPhotoBannerImageFZ from "./assets/previews/nakopneme_basic_photo_banner_fz.png"; import urgentBasicPhotoBannerImage from "./assets/previews/urgent_basic_photo_banner.png"; import makeawishPhotoBannerImage from "./assets/previews/make_a_wish_photo_banner.png"; import makeawishTourSocialImage from "./assets/previews/make_a_wish_tour_social.png"; Loading Loading @@ -70,6 +71,18 @@ const TEMPLATES = { title: "Nakopneme to! Základní banner s fotkou", }, }, nakopneme_basic_photo_banner: { name: "Nakopneme to! - Základní banner s fotkou F/Z pozadi", image: nakopnemeBasicPhotoBannerImageFZ, path: "/nakopneme-basic-photo-banner-fz", component: () => import( "./views/nakopneme_basic_photo_banner_fz/NakopnemeBasicPhotoBannerFZ.vue" ), meta: { title: "Nakopneme to! Základní banner s fotkou - F/Z pozadi", }, }, make_a_wish_banner: { name: "Máte přání banner", image: makeawishPhotoBannerImage, Loading frontend/src/views/angle_person_event_left/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading frontend/src/views/angle_person_event_right/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading frontend/src/views/avatar/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -45,10 +45,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/back_in_full_force_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -236,10 +236,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/back_in_full_force_tour_social/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -426,10 +426,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/back_in_full_force_tour_social_A2/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -426,10 +426,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/back_in_full_force_tour_social_wide/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -416,10 +416,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/base_person_event/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading frontend/src/views/basic_photo_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -348,10 +348,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/event_poster/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -94,10 +94,20 @@ const redraw = async (canvas, options) => { zIndex: 10, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/facebook_survey/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -363,10 +363,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/make_a_wish_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -304,10 +304,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/make_a_wish_tour_social/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -418,10 +418,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/make_a_wish_tour_social_A2/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -442,10 +442,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/make_a_wish_tour_social_wide/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -412,10 +412,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading frontend/src/views/nakopneme_basic_photo_banner/canvas.js +32 −26 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import { getSingleLineTextBoxWidth, } from "../../components/canvas/utils"; import { PaddedHighlightingTextbox } from "../../components/canvas/textbox"; import leftQuoteImage from '../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_left.png'; import rightQuoteImage from '../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_right.png'; import leftQuoteImage from "../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_left.png"; import rightQuoteImage from "../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_right.png"; let mainTextBox = null; let mainTextBoxBackground = null; Loading Loading @@ -149,14 +149,12 @@ const redraw = async (canvas, options) => { await imageLoadPromiseR; rightQuote = new fabric.Image(rightQuote, { left: getSingleLineTextBoxWidth( left: getSingleLineTextBoxWidth( mainTextBox.textLines[mainTextBox.textLines.length - 1], mainTextSize, "Bebas Neue" ) + ( (mainTextBox.textLines.length == 1) ? 260 : 170 ), "Bebas Neue", ) + (mainTextBox.textLines.length == 1 ? 260 : 170), top: mainTextBox.top + mainTextBox.height - mainTextSize + 6, zIndex: 20, selectable: false, Loading Loading @@ -189,19 +187,22 @@ const redraw = async (canvas, options) => { zIndex: 10, }); personNameText.set('fill', new fabric.Gradient({ type: 'linear', personNameText.set( "fill", new fabric.Gradient({ type: "linear", coords: { x1: 0, y1: 0, x2: canvas.width * 0.3, y2: 0 y2: 0, }, colorStops: [ { offset: 0, color: '#CF7BCC' }, { offset: 1, color: '#FDC801' } ] })); { offset: 0, color: "#CF7BCC" }, { offset: 1, color: "#FDC801" }, ], }), ); canvas.add(personNameText); } Loading Loading @@ -330,14 +331,19 @@ const redraw = async (canvas, options) => { mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); } else { Loading
frontend/src/templates.js +13 −0 Original line number Diff line number Diff line import basicPhotoBannerImage from "./assets/previews/basic_photo_banner.png"; import nakopnemeBasicPhotoBannerImage from "./assets/previews/nakopneme_basic_photo_banner.png"; import nakopnemeBasicPhotoBannerImageFZ from "./assets/previews/nakopneme_basic_photo_banner_fz.png"; import urgentBasicPhotoBannerImage from "./assets/previews/urgent_basic_photo_banner.png"; import makeawishPhotoBannerImage from "./assets/previews/make_a_wish_photo_banner.png"; import makeawishTourSocialImage from "./assets/previews/make_a_wish_tour_social.png"; Loading Loading @@ -70,6 +71,18 @@ const TEMPLATES = { title: "Nakopneme to! Základní banner s fotkou", }, }, nakopneme_basic_photo_banner: { name: "Nakopneme to! - Základní banner s fotkou F/Z pozadi", image: nakopnemeBasicPhotoBannerImageFZ, path: "/nakopneme-basic-photo-banner-fz", component: () => import( "./views/nakopneme_basic_photo_banner_fz/NakopnemeBasicPhotoBannerFZ.vue" ), meta: { title: "Nakopneme to! Základní banner s fotkou - F/Z pozadi", }, }, make_a_wish_banner: { name: "Máte přání banner", image: makeawishPhotoBannerImage, Loading
frontend/src/views/angle_person_event_left/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading
frontend/src/views/angle_person_event_right/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading
frontend/src/views/avatar/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -45,10 +45,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/back_in_full_force_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -236,10 +236,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/back_in_full_force_tour_social/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -426,10 +426,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/back_in_full_force_tour_social_A2/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -426,10 +426,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/back_in_full_force_tour_social_wide/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -416,10 +416,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/base_person_event/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -76,10 +76,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); personImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; personImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (personImage.width >= personImage.height) { personImage.scaleToHeight(canvas.height); Loading
frontend/src/views/basic_photo_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -348,10 +348,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/event_poster/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -94,10 +94,20 @@ const redraw = async (canvas, options) => { zIndex: 10, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/facebook_survey/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -363,10 +363,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/make_a_wish_banner/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -304,10 +304,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/make_a_wish_tour_social/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -418,10 +418,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/make_a_wish_tour_social_A2/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -442,10 +442,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/make_a_wish_tour_social_wide/canvas.js +14 −4 Original line number Diff line number Diff line Loading @@ -412,10 +412,20 @@ const redraw = async (canvas, options) => { zIndex: 0, }); mainImage.controls = { ...fabric.Image.prototype.controls, mtr: new fabric.Control({ visible: false }), }; mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); Loading
frontend/src/views/nakopneme_basic_photo_banner/canvas.js +32 −26 Original line number Diff line number Diff line Loading @@ -7,8 +7,8 @@ import { getSingleLineTextBoxWidth, } from "../../components/canvas/utils"; import { PaddedHighlightingTextbox } from "../../components/canvas/textbox"; import leftQuoteImage from '../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_left.png'; import rightQuoteImage from '../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_right.png'; import leftQuoteImage from "../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_left.png"; import rightQuoteImage from "../../assets/template/nakopneme_basic_photo_banner/nakopneme_quote_right.png"; let mainTextBox = null; let mainTextBoxBackground = null; Loading Loading @@ -149,14 +149,12 @@ const redraw = async (canvas, options) => { await imageLoadPromiseR; rightQuote = new fabric.Image(rightQuote, { left: getSingleLineTextBoxWidth( left: getSingleLineTextBoxWidth( mainTextBox.textLines[mainTextBox.textLines.length - 1], mainTextSize, "Bebas Neue" ) + ( (mainTextBox.textLines.length == 1) ? 260 : 170 ), "Bebas Neue", ) + (mainTextBox.textLines.length == 1 ? 260 : 170), top: mainTextBox.top + mainTextBox.height - mainTextSize + 6, zIndex: 20, selectable: false, Loading Loading @@ -189,19 +187,22 @@ const redraw = async (canvas, options) => { zIndex: 10, }); personNameText.set('fill', new fabric.Gradient({ type: 'linear', personNameText.set( "fill", new fabric.Gradient({ type: "linear", coords: { x1: 0, y1: 0, x2: canvas.width * 0.3, y2: 0 y2: 0, }, colorStops: [ { offset: 0, color: '#CF7BCC' }, { offset: 1, color: '#FDC801' } ] })); { offset: 0, color: "#CF7BCC" }, { offset: 1, color: "#FDC801" }, ], }), ); canvas.add(personNameText); } Loading Loading @@ -330,14 +331,19 @@ const redraw = async (canvas, options) => { mainImage.setControlsVisibility({ // corners (uniform scale) tl: true, tr: true, bl: true, br: true, tl: true, tr: true, bl: true, br: true, // mids (scale X/Y independently) ml: true, mr: true, mt: true, mb: true, ml: true, mr: true, mt: true, mb: true, // rotation mtr: false, }); if (mainImage.width >= mainImage.height) { mainImage.scaleToHeight(canvas.height); } else { Loading