From 450631f1a96ed162bb0d15fd44394be7d8fa07e2 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 2 Dec 2013 06:23:19 +0400 Subject: [PATCH] started experimenting with image structure -- want filters to affect only the image (not the bg and all that's inside) and at the same time keep it at 1 tag... Signed-off-by: Alex A. Naanou --- ui/data.js | 6 +- ui/editor.js | 4 + .../seporate-image-and-background.html | 91 +++++++++++++++++++ ui/lib/editor.js | 1 + 4 files changed, 99 insertions(+), 3 deletions(-) create mode 100755 ui/experiments/seporate-image-and-background.html diff --git a/ui/data.js b/ui/data.js index 0f7cc5ba..56843ed8 100755 --- a/ui/data.js +++ b/ui/data.js @@ -1186,6 +1186,9 @@ function updateImage(image, gid, size, sync){ // flip... setImageFlipState(image, img_data.flipped == null ? [] : img_data.flipped) + // XXX filter settings... + // XXX + // NOTE: this only has effect on non-square image blocks... correctImageProportionsForRotation(image) @@ -1196,9 +1199,6 @@ function updateImage(image, gid, size, sync){ image.removeClass('marked') } - // XXX load filter settings... - // XXX - return image } diff --git a/ui/editor.js b/ui/editor.js index e9547e8c..db70aa30 100755 --- a/ui/editor.js +++ b/ui/editor.js @@ -30,6 +30,8 @@ var toggleEditor = createCSSClassToggler( top: '50px', left: '5px', }) + // XXX add handlers for saving data to images... + // XXX // make clicks on unfocusable elements remove focus... .click(function(){ if(event.target != $('.panel :focus')[0]){ @@ -39,6 +41,8 @@ var toggleEditor = createCSSClassToggler( // setup the event to update the editor... .on('focusingImage', function(){ if(toggleEditor('?') == 'on'){ + // XXX save previous settings if changes... + // XXX reloadControls('.current.image') } }) diff --git a/ui/experiments/seporate-image-and-background.html b/ui/experiments/seporate-image-and-background.html new file mode 100755 index 00000000..f56662c1 --- /dev/null +++ b/ui/experiments/seporate-image-and-background.html @@ -0,0 +1,91 @@ + + + + + +
+
+ +
+ +
+
+
+
+ + diff --git a/ui/lib/editor.js b/ui/lib/editor.js index 9204a573..aea05b33 100755 --- a/ui/lib/editor.js +++ b/ui/lib/editor.js @@ -236,6 +236,7 @@ function makeLogRange(text, filter, target){ } +// XXX add panel update events to help save settings... function makeEditorControls(target){ // tool panel... var panel = $('
')