From: Thomas Bläsius Date: Wed, 26 Aug 2015 09:33:27 +0000 (+0200) Subject: graph iplet should now also work with ipe versions 7.1.7 and 7.1.8 X-Git-Url: https://i11git.iti.kit.edu/anon-gitweb/?p=Misc%2Fipe.git;a=commitdiff_plain;h=2014e0a1401fd8f29dbb52791814e42ecc1df09f;ds=sidebyside graph iplet should now also work with ipe versions 7.1.7 and 7.1.8 --- diff --git a/ipelets/graph/graph.lua b/ipelets/graph/graph.lua index c2cf500..7889367 100644 --- a/ipelets/graph/graph.lua +++ b/ipelets/graph/graph.lua @@ -86,14 +86,21 @@ _G.EDITTOOL.graph_backup_key = _G.EDITTOOL.key -- overwriting function _G.EDITTOOL:key(code, modifiers, text) + -- The parameters of the key() function have changed in version + -- 7.1.7. Thus, we potentially have to remap the parameters. + if text == nil then + text = code + end self:graph_backup_key(code, modifiers, text) if deactivateGraphMode then return end -- react if and only if we are currently editing a mark and key ESC -- or SPACE is pressed - if text ~= "\027" and code ~= 0x20 then return end - if not editing then return end + -- if text ~= "\027" and code ~= 0x20 then return end + if text ~= "\027" and text ~= " " then return end + if not editing then return end + editing = false -- finding new and old position