Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • master
  • v2
  • v2-test
  • piratiuk
  • regionalSuccess
  • v1
6 results

Target

Select target project
  • to-generator / Graphics generator
1 result
Select Git revision
  • master
  • v2
  • v2-test
  • piratiuk
  • regionalSuccess
  • v1
6 results
Show changes

Commits on Source 2

27 files
+ 884
114
Compare changes
  • Side-by-side
  • Inline

Files

+49.1 KiB

49.15 KiB

+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";
@@ -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,
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+14 −4
Original line number Diff line number Diff line
@@ -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);
+32 −26
Original line number Diff line number Diff line
@@ -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;
@@ -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,
@@ -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);
    }
@@ -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 {