This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "json" | |
require "digest/md5" | |
require "fileutils" | |
class DirectoryCommit | |
def initialize(working_path, sync_path, ignore = nil) | |
@hash_file = '.filehashes-' + working_path.gsub(/[^\w]/, '') | |
@working_path = working_path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getRegistrationPoint(element) { | |
var t = element.matrix; | |
if (t.b == 0 && t.c == 0) { | |
return { x: (element.x - element.left) / t.a, y: (element.y - element.top) / t.d }; | |
} | |
var doc = fl.getDocumentDOM(); | |
var previousSelection = doc.selection; | |
doc.selection = [element]; | |
doc.enterEditMode(); | |
var reg = getRegistrationPoint(doc.selection[0]); |