Search results

Integration with toolbar in Vue Signature component

18 May 2022 / 6 minutes to read

The Signature component integrates with the toolbar and the interaction performed using the change event of the toolbar. In that, canUndo, canRedo and isEmpty methods were used to enable/disable undo, redo, and clear buttons.

Source
Preview
app.vue
Copied to clipboard
<template>
  <div>
    <div class="col-lg-12 control-section">
      <div id="signature-toolbar-control">
        <ejs-toolbar id="toolbar" :created="onCreate" :clicked="clicked">
          <e-items>
            <e-item text='Undo' prefixIcon='e-icons e-undo' tooltipText='Undo (Ctrl + Z)'></e-item>
            <e-item text='Redo' prefixIcon='e-icons e-redo' tooltipText='Redo (Ctrl + Y)' ></e-item>
            <e-item type='Separator'></e-item>
            <e-item tooltipText= 'Save (Ctrl + S)' :template= 'SaveTemplate'></e-item>
            <e-item type='Separator'></e-item>
            <e-item tooltipText= 'Stroke Color' :template= 'StrokeColorTemplate'></e-item>
            <e-item type='Separator'></e-item>
            <e-item tooltipText= 'Background Color' :template= 'BgColorTemplate'></e-item>
            <e-item type='Separator'></e-item>
            <e-item tooltipText= 'Stroke Width' :template= 'StrokeWidthTemplate'></e-item>
            <e-item type='Separator'></e-item>
            <e-item  text= 'Clear' prefixIcon= 'e-sign-icons e-clear' tooltipText= 'Clear'></e-item>
            <e-item tooltipText= 'Disabled' :template='DisableTemplate' align='Right'></e-item>
          </e-items>
        </ejs-toolbar>
        <div id="signature-control">
          <ejs-signature #signature id="signature" :maxStrokeWidth="maxStrokeWidth" style="height: 90%; width:100%;" :change="signChange"></ejs-signature>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue';
import { SignaturePlugin, ColorPickerPlugin } from "@syncfusion/ej2-vue-inputs";
import { ToolbarPlugin } from "@syncfusion/ej2-vue-navigations";
import { SplitButtonPlugin } from "@syncfusion/ej2-vue-splitbuttons";
import { CheckBoxPlugin, ButtonPlugin } from "@syncfusion/ej2-vue-buttons";
import { getComponent, addClass, createElement } from '@syncfusion/ej2-base';
import { DropDownListPlugin } from "@syncfusion/ej2-vue-dropdowns";
import { enableRipple } from '@syncfusion/ej2-base';

enableRipple(true);
Vue.use(SignaturePlugin);
Vue.use(ColorPickerPlugin);
Vue.use(ToolbarPlugin);
Vue.use(SplitButtonPlugin);
Vue.use(CheckBoxPlugin);
Vue.use(ButtonPlugin);
Vue.use(DropDownListPlugin);


export default {
  data: function() {
    return {
      maxStrokeWidth: 2,
      SaveTemplate: function () {
        return {
            template: Vue.component('SplitButtonComponent', {
            template: '<ejs-splitbutton content="Save" id="save-option" :items="items" iconCss= "e-sign-icons e-save" :select="onSelect" disabled="true"></ejs-splitbutton>',
            data() { return {
                items: [
                {
                  text: 'Png'
                },
                {
                  text: 'Jpeg'
                },
                {
                  text: 'Svg'
                }
              ]};
            },
            methods: {
              onSelect: function(args) {
                var signature = getComponent(document.getElementById('signature'), 'signature');
                signature.save(args.item.text, 'Signature');
             }
            }
          })
        }
      },
      StrokeColorTemplate: function () {
        return {
            template: Vue.component('ColorPickerComponent', {
            template: '<ejs-colorpicker id="stroke-color" mode="Palette" cssClass="e-stroke-color" :change="strokeColorChanged"  :modeSwitcher= "false" :columns="4" :presetColors="customColors" :beforeTileRender="beforeTileRender" :showButtons= "false"></ejs-colorpicker>',
            data() { return {
              customColors:{
                'custom': ['#000000', '#e91e63', '#9c27b0', '#673ab7', '#2196f3', '#03a9f4', '#00bcd4',
                '#009688', '#8bc34a', '#cddc39', '#ffeb3b', '#ffc107']
              }
            };},
            methods: {
              beforeTileRender: function(args) {
                args.element.classList.add('e-circle-palette');
                args.element.appendChild(createElement('span', { className: 'e-circle-selection' }));
              },
              strokeColorChanged: function(args) {
                var signature = getComponent(document.getElementById('signature'), 'signature');
                var strokecolor = getComponent(document.getElementById('stroke-color'), 'colorpicker');
                if (signature.disabled) {
                  return;
                }
                var selElem= strokecolor.element.nextElementSibling.querySelector('.e-selected-color');
                selElem.style.borderBottomColor = args.currentValue.rgba;
                signature.strokeColor = args.currentValue.rgba;
              }
             }
          })
        }
      },
      BgColorTemplate: function () {
        return {
          template: Vue.component('ColorPickerComponent', {
            template: '<ejs-colorpicker id="bg-color" noColor="true" mode="Palette" cssClass="e-bg-color" :change="bgColorChanged" :modeSwitcher= "false" :columns="4" :presetColors="customColors" :beforeTileRender="beforeTileRender1" :showButtons= "false"></ejs-colorpicker>',
            data() { return {
              customColors:{
                'custom': ['#ffffff', '#f44336', '#e91e63', '#9c27b0', '#673ab7', '#2196f3', '#03a9f4', '#00bcd4',
                '#009688', '#8bc34a', '#cddc39', '#ffeb3b']
              }
            };},
            methods: {
              beforeTileRender1: function(args) {
                args.element.classList.add('e-circle-palette');
                args.element.appendChild(createElement('span', { className: 'e-circle-selection' }));
              },
              bgColorChanged: function(args) {
                var signature = getComponent(document.getElementById('signature'), 'signature');
                var bgcolor = getComponent(document.getElementById('bg-color'), 'colorpicker');
                if (signature.disabled) {
                  return;
                }
                var selElem= bgcolor.element.nextElementSibling.querySelector('.e-selected-color');
                signature.backgroundColor = args.currentValue.rgba;
                selElem.style.borderBottomColor = args.currentValue.rgba;
              }
            }
          })
        }
      },
      DisableTemplate: function () {
        return {
          template: Vue.component('CheckBoxComponent', {
            template: '<ejs-checkbox label="Disabled" :change="change1"></ejs-checkbox>',
            data() { return {
            };},
            methods: {
              change1: function(args) {
                var signature = getComponent(document.getElementById('signature'), 'signature');
                signature.disabled = args.checked;
              }
            }
          })
        }
      },
      StrokeWidthTemplate: function () {
        return {
          template: Vue.component('DropDownListComponent', {
            template: '<ejs-dropdownlist  :value="value" width="60" :dataSource="items":change="numChange"></ejs-dropdownlist>',
            data() { return {
              value: 2,
              items:[1, 2, 3, 4, 5]
            };},
            methods: {
              numChange: function(args) {
                var signature = getComponent(document.getElementById('signature'), 'signature');
                signature.maxStrokeWidth = args.value;
              }
            }
          })
        }
      }
    };
  },
  methods: {
    onCreate: function() {
      var strokeColor = getComponent(document.getElementById('stroke-color'), 'colorpicker');
      var bgColor = getComponent(document.getElementById('bg-color'), 'colorpicker');
      addClass([strokeColor.element.nextElementSibling.querySelector('.e-selected-color')], 'e-sign-icons');
      addClass([bgColor.element.nextElementSibling.querySelector('.e-selected-color')], 'e-sign-icons');
      document.getElementById('save-option').addEventListener('click', this.saveBtnClick);
      var cBtn = this.clearButton();
      cBtn.disabled = true;
      var toolbarlItems = document.querySelectorAll('.e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-tbtn-txt');
      for (var i = 0; i < toolbarlItems.length; i++) {
        if (toolbarlItems[i].children[0].classList.contains('e-undo')) {
          var undoButton = getComponent(toolbarlItems[i] , 'btn');
          undoButton.disabled = true;
        }
        if (toolbarlItems[i].children[0].classList.contains('e-redo')) {
          var redoButton= getComponent(toolbarlItems[i], 'btn');
          redoButton.disabled = true;
        }
      }
    },
    clicked:function(args) {
      var signature = getComponent(document.getElementById('signature'), 'signature');
      var saveBtn =  getComponent(document.getElementById("save-option"), 'split-btn');
      if (signature.disabled) {
        return;
      }
      switch (args.item.tooltipText) {
        case 'Undo (Ctrl + Z)':
          if (signature.canUndo()) {
            signature.undo();
            this.updateUndoRedo();
            this.updateSaveBtn();
          }
          break;
        case 'Redo (Ctrl + Y)':
          if (signature.canRedo()) {
            signature.redo();
            this.updateUndoRedo();
            this.updateSaveBtn();
          }
          break;
        case 'Clear':
          signature.clear();
          if (signature.isEmpty()) {
            var cBtn = this.clearButton();
            cBtn.disabled = true;
            saveBtn.disabled = true;
          }
          break;
        case 'Disabled':
          signature.disabled = !(args.item.template).checked;
      }
    },
    signChange: function() {
      var signature = getComponent(document.getElementById('signature'), 'signature');
      var saveBtn =  getComponent(document.getElementById("save-option"), 'split-btn');
      if (!signature.isEmpty()) {
        var cBtn = this.clearButton();
        saveBtn.disabled = false;
        cBtn.disabled = false;
      }
      this.updateUndoRedo();
    },
    saveBtnClick: function() {
      var signature = getComponent(document.getElementById('signature'), 'signature');
      signature.save();
    },
    clearButton: function() {
      var tlItems = document.querySelectorAll('.e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-tbtn-txt');
      for (var i = 0; i < tlItems.length; i++) {
        if (tlItems[i].children[0].classList.contains('e-clear')) {
          var clrBtn = getComponent(tlItems[i], 'btn');
        }
      }
      return clrBtn;
    },
    updateSaveBtn: function() {
        var signature = getComponent(document.getElementById('signature'), 'signature');
        var saveBtn = getComponent(document.getElementById("save-option"), 'split-btn');
        if (signature.isEmpty()) {
            saveBtn.disabled = true;
        }
    },
    updateUndoRedo: function() {
      var signature = getComponent(document.getElementById('signature'), 'signature');
      var undoButton; var redoButton;
      var tlItems = document.querySelectorAll('.e-toolbar .e-toolbar-items .e-toolbar-item .e-tbar-btn.e-tbtn-txt');
      for (var i = 0; i < tlItems.length; i++) {
        if (tlItems[i].children[0].classList.contains('e-undo')) {
          undoButton = getComponent(tlItems[i], 'btn');
        }
        if (tlItems[i].children[0].classList.contains('e-redo')) {
          redoButton = getComponent(tlItems[i], 'btn');
        }
      }
      if (signature.canUndo()) {
        undoButton.disabled = false;
      } else {
        undoButton.disabled = true;
      }
      if (signature.canRedo()) {
        redoButton.disabled = false;
      } else {
        redoButton.disabled = true;
      }
    }
  }
}
</script>

<style>

@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-buttons/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-inputs/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-lists/styles/material.css";
@import '../node_modules/@syncfusion/ej2-popups/styles/material.css';
@import '../node_modules/@syncfusion/ej2-splitbuttons/styles/material.css';
@import "../node_modules/@syncfusion/ej2-navigations/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-dropdowns/styles/material.css";

@font-face {
  font-family: 'font-icons';
  src:
  url(data:application/x-font-ttf;charset=utf-8;base64,AAEAAAAKAIAAAwAgT1MvMj1tSfwAAAEoAAAAVmNtYXDOQM6IAAABqAAAAE5nbHlmPRFAxQAAAhAAAAlsaGVhZB6WKa0AAADQAAAANmhoZWEIUQQLAAAArAAAACRobXR4KAAAAAAAAYAAAAAobG9jYQowB4oAAAH4A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0AC0AaQBjAG8AbgBzAGYAbwBuAHQALQBpAGMAbwBuAHMAVgBlAHIAcwBpAG8AbgAgADEALgAwAGYAbwBuAHQALQBpAGMAbwBuAHMARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAdQBzAGkAbgBnACAAUwB5AG4AYwBmAHUAcwBpAG8AbgAgAE0AZQB0AHIAbwAgAFMAdAB1AGQAaQBvAHcAdwB3AC4AcwB5AG4AYwBmAHUAcwBpAG8AbgAuAGMAbwBtAAAAAAIAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgECAQMBBAEFAQYBBwEIAQkBCgELAAdzYXZlXzAyB3NhdmUtMDEHZWRpdF8wMwdlZGl0XzAxBWNsZWFyDHBhaW50LWJ1Y2tldA9wYWludC1idWNrZXQtd2YGaW1hZ2VzC3BpY3R1cmVzLXdmAAAA) format('truetype');
  font-weight: normal;
  font-style: normal;
}
.e-sign-icons {
  font-family: 'font-icons' !important;
  font-size: 55px;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#signature-toolbar-control {
  border: 1px solid lightgray;
}
.highcontrast #signature-toolbar-control {
  border: 1px solid white;
}
#signature-toolbar-control #toolbar {
  border: none;
  border-bottom: 1px solid lightgray;
  box-sizing: border-box;
}
    #signature-toolbar-control #toolbar {
        height: 44px !important;
    }
#signature-toolbar-control .e-btn:disabled {
  opacity: 0.5 !important;
  pointer-events: none;
}
#signature-toolbar-control #signature-control {
  height: 300px;
  width: 100%;
  margin: 0;
}
#signature-toolbar-control #signature {
  border: none !important;
}
.e-colorpicker-wrapper.e-bg-color #bg-color+.e-split-btn-wrapper .e-split-btn .e-selected-color {
  background: none;
  border-bottom-style: solid;
  border-bottom-width: 3px;
  width: 14px;
  margin: 0px 2px;
  border-bottom-color: #ffffff;
}
.e-colorpicker-wrapper.e-stroke-color #stroke-color+.e-split-btn-wrapper .e-split-btn .e-selected-color {
  background: none;
  border-bottom-style: solid;
  border-bottom-width: 3px;
  width: 14px;
  margin: 0px 2px;
  border-bottom-color: #000000;
}
.e-colorpicker-wrapper.e-bg-color #bg-color+.e-split-btn-wrapper .e-split-btn .e-selected-color .e-split-preview,
.e-colorpicker-wrapper.e-stroke-color #stroke-color+.e-split-btn-wrapper .e-split-btn .e-selected-color .e-split-preview {
  display: none;
}
.e-colorpicker-wrapper.e-bg-color #bg-color+.e-split-btn-wrapper .e-split-btn .e-selected-color::before {
  content: '\e707';
}
.e-colorpicker-wrapper.e-stroke-color #stroke-color+.e-split-btn-wrapper .e-split-btn .e-selected-color::before {
  content: '\e704';
}
#signature-toolbar-control .e-clear::before {
  content: '\e706';
}
#signature-toolbar-control .e-save::before {
  content: '\e701';
}
/* Circle palette customization */
.e-container .e-palette .e-circle-palette {
  border: 0;
  height: 32px;
  width: 32px;
  border-radius: 20px;
  margin: 4px;
}
.e-container .e-palette .e-circle-palette:hover {
  box-shadow: none;
  transform: scale(1.2);
  transition: transform .2s ease-out;
}
.e-circle-palette .e-circle-selection {
  height: 32px;
  width: 32px;
  border-radius: 20px;
  display: inline-block;
  transform: scale(0);
  transition: transform 1.2s ease-in;
}
.e-circle-palette.e-selected .e-circle-selection {
  transform: scale(0.8);
  background-color: #fff;
  transition: transform .2s ease-out;
}
#circle-palette+.e-container,
#scroll-palette+.e-container {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}
.e-container .e-palette .e-circle-palette.e-selected {
    outline: none;
}
.e-bg-color .e-circle-palette.e-nocolor-item.e-selected .e-circle-selection {
    background: transparent;
}
.e-bg-color .e-circle-palette.e-nocolor-item.e-selected {
    border: 3px solid lightgray;
}

</style>