I have a Template Component that was working as-expected before, but I fear an update may have broken this. I’m getting the following Javascript error: “Uncaught TypeError: Cannot read property ‘resetCanvas’ of undefined” The property is part of a javascript library I’m using to capture signatures on an HTML canvas. Did an update change the way these libraries are imported into SKUID now? Here’s my code, the error is being thrown when trying to access a property that is instantiated by the library:
var element = argumentsn0], $ = skuid.$; $(document).ready(function() { // init signature canvas element.jSignature(); element.jSignature("reset"); // ERROR IS THROWN HERE // Create new signature in text field var model = skuid.model.getModel('PDP_Detail'), row = model.getFirstRow(), sigField = 'Manager_Signature__c', sigData = model.getFieldValue(row,sigField); if(sigData !== null ) { // read back Signature data element.jSignature("setData", "data:" + sigData); } // disable manager signature for individual var pdpModel = skuid.model.getModel('PDP_Detail'), pdpRow = pdpModel.getFirstRow(); if((pdpRow.Contact__r.Staff_Supervisor__r.FirstName != skuid.utils.userInfo.firstName && pdpRow.Contact__r.Staff_Supervisor__r.LastName != skuid.utils.userInfo.lastName) || pdpRow.Stage__c == 'Cycle Complete') { element.jSignature("disable"); //ALSO THROWN HERE IF I COMMENT THE ABOVE ERROR OUT } });