From 92f3207b50a1caca07df5c5b238212af3358905b Mon Sep 17 00:00:00 2001 From: adhitya Date: Mon, 11 Apr 2016 15:10:54 +0000 Subject: Revert last two commits - Keyboard shortcuts are not working --- src/js/io/mxTerminalChangeCodec.js | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/js/io/mxTerminalChangeCodec.js (limited to 'src/js/io/mxTerminalChangeCodec.js') diff --git a/src/js/io/mxTerminalChangeCodec.js b/src/js/io/mxTerminalChangeCodec.js new file mode 100644 index 0000000..a51d871 --- /dev/null +++ b/src/js/io/mxTerminalChangeCodec.js @@ -0,0 +1,42 @@ +/** + * $Id: mxTerminalChangeCodec.js,v 1.7 2010-09-13 15:58:36 gaudenz Exp $ + * Copyright (c) 2006-2010, JGraph Ltd + */ +mxCodecRegistry.register(function() +{ + /** + * Class: mxTerminalChangeCodec + * + * Codec for s. This class is created and registered + * dynamically at load time and used implicitely via and + * the . + * + * Transient Fields: + * + * - model + * - previous + * + * Reference Fields: + * + * - cell + * - terminal + */ + var codec = new mxObjectCodec(new mxTerminalChange(), + ['model', 'previous'], ['cell', 'terminal']); + + /** + * Function: afterDecode + * + * Restores the state by assigning the previous value. + */ + codec.afterDecode = function(dec, node, obj) + { + obj.previous = obj.terminal; + + return obj; + }; + + // Returns the codec into the registry + return codec; + +}()); -- cgit