diff --git a/CHANGELOG.md b/CHANGELOG.md index 50d52be..206fa57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +#### 4.1.2 (24/02/2015) +Correction de bugs : +* Mots mal détruits + #### 4.1.1 (24/02/2015) Fonctionnalités : * Ajout du son ambiant à nouveau (+ version mp3) diff --git a/README.md b/README.md index 90e6277..93c9363 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Application - La Séparation v4.1.1 +Application - La Séparation v4.1.2 ======= Application web et tablette sur la poésie à deux mi-mots diff --git a/build/res/img b/build/res/img deleted file mode 120000 index e7c1d1e..0000000 --- a/build/res/img +++ /dev/null @@ -1 +0,0 @@ -../../res/img/ \ No newline at end of file diff --git a/build/res/img/editeur/add.png b/build/res/img/editeur/add.png new file mode 100644 index 0000000..b468fe3 Binary files /dev/null and b/build/res/img/editeur/add.png differ diff --git a/build/res/img/font/centrale_b.png b/build/res/img/font/centrale_b.png new file mode 100755 index 0000000..376deb1 Binary files /dev/null and b/build/res/img/font/centrale_b.png differ diff --git a/build/res/img/font/centrale_c.png b/build/res/img/font/centrale_c.png new file mode 100755 index 0000000..8b573c4 Binary files /dev/null and b/build/res/img/font/centrale_c.png differ diff --git a/build/res/img/font/centrale_h.png b/build/res/img/font/centrale_h.png new file mode 100755 index 0000000..0c47c9b Binary files /dev/null and b/build/res/img/font/centrale_h.png differ diff --git a/build/res/img/font/demibas_b.png b/build/res/img/font/demibas_b.png new file mode 100755 index 0000000..f648d24 Binary files /dev/null and b/build/res/img/font/demibas_b.png differ diff --git a/build/res/img/font/demibas_h.png b/build/res/img/font/demibas_h.png new file mode 100755 index 0000000..2cf45d8 Binary files /dev/null and b/build/res/img/font/demibas_h.png differ diff --git a/build/res/img/font/demihaut.png b/build/res/img/font/demihaut.png new file mode 100755 index 0000000..d2fc452 Binary files /dev/null and b/build/res/img/font/demihaut.png differ diff --git a/build/res/img/font/demihaut_b.png b/build/res/img/font/demihaut_b.png new file mode 100755 index 0000000..8ddbfd1 Binary files /dev/null and b/build/res/img/font/demihaut_b.png differ diff --git a/build/res/img/font/demihaut_h.png b/build/res/img/font/demihaut_h.png new file mode 100755 index 0000000..df561ea Binary files /dev/null and b/build/res/img/font/demihaut_h.png differ diff --git a/build/res/img/gui/arrow_left.png b/build/res/img/gui/arrow_left.png new file mode 100755 index 0000000..ca36465 Binary files /dev/null and b/build/res/img/gui/arrow_left.png differ diff --git a/build/res/img/gui/arrow_right.png b/build/res/img/gui/arrow_right.png new file mode 100755 index 0000000..a3a1702 Binary files /dev/null and b/build/res/img/gui/arrow_right.png differ diff --git a/build/res/img/gui/back.png b/build/res/img/gui/back.png new file mode 100755 index 0000000..28ceba5 Binary files /dev/null and b/build/res/img/gui/back.png differ diff --git a/build/res/img/gui/cross.png b/build/res/img/gui/cross.png new file mode 100755 index 0000000..4638d02 Binary files /dev/null and b/build/res/img/gui/cross.png differ diff --git a/build/res/img/gui/hand.png b/build/res/img/gui/hand.png new file mode 100755 index 0000000..78533a2 Binary files /dev/null and b/build/res/img/gui/hand.png differ diff --git a/build/res/img/gui/logo_miniature.png b/build/res/img/gui/logo_miniature.png new file mode 100755 index 0000000..5e58a67 Binary files /dev/null and b/build/res/img/gui/logo_miniature.png differ diff --git a/build/res/img/gui/logo_miniature_old.png b/build/res/img/gui/logo_miniature_old.png new file mode 100755 index 0000000..a23cb93 Binary files /dev/null and b/build/res/img/gui/logo_miniature_old.png differ diff --git a/build/res/img/gui/roll_down.png b/build/res/img/gui/roll_down.png new file mode 100755 index 0000000..05787dc Binary files /dev/null and b/build/res/img/gui/roll_down.png differ diff --git a/build/res/img/gui/roll_down_left.png b/build/res/img/gui/roll_down_left.png new file mode 100755 index 0000000..4289b5f Binary files /dev/null and b/build/res/img/gui/roll_down_left.png differ diff --git a/build/res/img/gui/roll_up.png b/build/res/img/gui/roll_up.png new file mode 100755 index 0000000..8e05b63 Binary files /dev/null and b/build/res/img/gui/roll_up.png differ diff --git a/build/res/img/gui/roll_up_left.png b/build/res/img/gui/roll_up_left.png new file mode 100755 index 0000000..4cd6ee4 Binary files /dev/null and b/build/res/img/gui/roll_up_left.png differ diff --git a/build/res/img/gui/sauvegarde.png b/build/res/img/gui/sauvegarde.png new file mode 100755 index 0000000..ef684c2 Binary files /dev/null and b/build/res/img/gui/sauvegarde.png differ diff --git a/build/res/img/gui/scroll_down.png b/build/res/img/gui/scroll_down.png new file mode 100755 index 0000000..19b9ac9 Binary files /dev/null and b/build/res/img/gui/scroll_down.png differ diff --git a/build/res/img/gui/scroll_left.png b/build/res/img/gui/scroll_left.png new file mode 100755 index 0000000..16fa1bb Binary files /dev/null and b/build/res/img/gui/scroll_left.png differ diff --git a/build/res/img/gui/scroll_right.png b/build/res/img/gui/scroll_right.png new file mode 100755 index 0000000..b8f2ee8 Binary files /dev/null and b/build/res/img/gui/scroll_right.png differ diff --git a/build/res/img/gui/scroll_up.png b/build/res/img/gui/scroll_up.png new file mode 100755 index 0000000..8552117 Binary files /dev/null and b/build/res/img/gui/scroll_up.png differ diff --git a/build/res/img/logo/logo.png b/build/res/img/logo/logo.png new file mode 100755 index 0000000..5e58a67 Binary files /dev/null and b/build/res/img/logo/logo.png differ diff --git a/build/res/img/logo/logo_central.png b/build/res/img/logo/logo_central.png new file mode 100755 index 0000000..ef99c5a Binary files /dev/null and b/build/res/img/logo/logo_central.png differ diff --git a/build/res/img/logo/logo_down.png b/build/res/img/logo/logo_down.png new file mode 100755 index 0000000..5f49322 Binary files /dev/null and b/build/res/img/logo/logo_down.png differ diff --git a/build/res/img/logo/logo_up.png b/build/res/img/logo/logo_up.png new file mode 100755 index 0000000..ee2a724 Binary files /dev/null and b/build/res/img/logo/logo_up.png differ diff --git a/build/res/img/menu_labo/checkbox.png b/build/res/img/menu_labo/checkbox.png new file mode 100755 index 0000000..aa5eadf Binary files /dev/null and b/build/res/img/menu_labo/checkbox.png differ diff --git a/build/res/img/menu_labo/checkbox_valid.png b/build/res/img/menu_labo/checkbox_valid.png new file mode 100755 index 0000000..ef9553c Binary files /dev/null and b/build/res/img/menu_labo/checkbox_valid.png differ diff --git a/build/res/img/menu_labo/input_text.png b/build/res/img/menu_labo/input_text.png new file mode 100755 index 0000000..5050252 Binary files /dev/null and b/build/res/img/menu_labo/input_text.png differ diff --git a/build/res/img/menu_labo/input_text_working_on.png b/build/res/img/menu_labo/input_text_working_on.png new file mode 100755 index 0000000..41c4b49 Binary files /dev/null and b/build/res/img/menu_labo/input_text_working_on.png differ diff --git a/build/res/img/menu_recit/erase.png b/build/res/img/menu_recit/erase.png new file mode 100755 index 0000000..a4aadb9 Binary files /dev/null and b/build/res/img/menu_recit/erase.png differ diff --git a/build/res/img/menu_recit/vignette.png b/build/res/img/menu_recit/vignette.png new file mode 100755 index 0000000..7b7dc0c Binary files /dev/null and b/build/res/img/menu_recit/vignette.png differ diff --git a/build/res/img/menu_recit/vignette_working_on.png b/build/res/img/menu_recit/vignette_working_on.png new file mode 100755 index 0000000..6213c65 Binary files /dev/null and b/build/res/img/menu_recit/vignette_working_on.png differ diff --git a/build/res/img/ombre/CYGNE.png b/build/res/img/ombre/CYGNE.png new file mode 100755 index 0000000..84ac11c Binary files /dev/null and b/build/res/img/ombre/CYGNE.png differ diff --git a/build/res/img/ombre/OMBRE.png b/build/res/img/ombre/OMBRE.png new file mode 100755 index 0000000..9ef0468 Binary files /dev/null and b/build/res/img/ombre/OMBRE.png differ diff --git a/build/res/img/ombre/shading.png b/build/res/img/ombre/shading.png new file mode 100755 index 0000000..0c5538b Binary files /dev/null and b/build/res/img/ombre/shading.png differ diff --git a/build/res/img/ombre/slicing.png b/build/res/img/ombre/slicing.png new file mode 100755 index 0000000..a296910 Binary files /dev/null and b/build/res/img/ombre/slicing.png differ diff --git a/build/res/sound/ambiant.mp3 b/build/res/sound/ambiant.mp3 deleted file mode 120000 index 46c50b3..0000000 --- a/build/res/sound/ambiant.mp3 +++ /dev/null @@ -1 +0,0 @@ -../../../res/sound/ambiant.mp3 \ No newline at end of file diff --git a/build/res/sound/ambiant.mp3 b/build/res/sound/ambiant.mp3 new file mode 100644 index 0000000..56a06e5 Binary files /dev/null and b/build/res/sound/ambiant.mp3 differ diff --git a/build/res/sound/ambiant.ogg b/build/res/sound/ambiant.ogg deleted file mode 120000 index 5608ab7..0000000 --- a/build/res/sound/ambiant.ogg +++ /dev/null @@ -1 +0,0 @@ -../../../res/sound/ambiant.ogg \ No newline at end of file diff --git a/build/res/sound/ambiant.ogg b/build/res/sound/ambiant.ogg new file mode 100755 index 0000000..e0dc5ee Binary files /dev/null and b/build/res/sound/ambiant.ogg differ diff --git a/build/res/story b/build/res/story deleted file mode 120000 index 9998662..0000000 --- a/build/res/story +++ /dev/null @@ -1 +0,0 @@ -../../res/story/ \ No newline at end of file diff --git a/build/res/story/stories.js b/build/res/story/stories.js new file mode 100755 index 0000000..cfbfdf7 --- /dev/null +++ b/build/res/story/stories.js @@ -0,0 +1,15 @@ +var StoriesDb = new Object(); + +StoriesDb.fr_stories = [ + '{"isStatic":true, "name":"Demi tour", "type":"one_page", "pages":[{"lines":[{"words":[{"value":"Demi tour", "zoom":1}]}, {"words":[{"value":"marche", "next_value":"arriere", "police":1, "code":"IIIIIIILIIL", "zoom":2}]}, {"words":[{"value":" "}]}]}]}', + '{"isStatic":true, "name":"Separation", "type":"one_page", "pages":[{"lines":[{"words":[{"value":"CETTE", "zoom":1}, {"value":"SEPARATION", "next_value":"PERCEPTION", "police":0, "code":"AAAAAATIAII", "zoom":1}]}, {"words":[{"value":"OMBRE", "next_value":"CYGNE", "police":3}, {"value":" QUI GLISSE"}]}, {"words":[{"value":"SABRE", "next_value":"SACRE", "police":2, "zoom":1}, {"value":"NOTRE UNION", "police":2}]}]}]}', + '{"isStatic":true, "name":"Quotidien", "type":"one_page", "pages":[{"lines":[{"words":[{"value":"BOUCHER", "next_value":"BOXEUSE", "police":0, "code":"AAIICIIAA", "zoom":1}]}, {"words":[{"value":"LUC", "next_value":"LOU", "police":1, "zoom":1}, {"value":"DECOUPE", "next_value":"DEGUSTE", "police":1, "zoom":1}, {"value":"DU"}, {"value":"PORC", "next_value":"SANG", "police":0, "code":"AAAA", "zoom":1}]}]}]}', + ]; + +StoriesDb.en_stories = [ + '{"isStatic":true, "name":"Separation", "type":"one_page", "pages":[{"lines":[{"words":[{"value":"THIS", "zoom":1}, {"value":"SEPARATION", "next_value":"PERCEPTION", "police":0, "code":"AAAAAATIAII", "zoom":1}]}, {"words":[{"value":"which crept"}]}, {"words":[{"value":"in the"}, {"value":"shading", "next_value":"slicing", "police":3}, {"value":" of words"}]}, {"words":[{"value":"SHREDS", "next_value":"CHASES", "police":2, "code":"hack_sale", "zoom":1}, {"value":"ME", "police":2}]}]}]}', + '{"isStatic":true, "name":"Translation", "type":"one_page", "pages":[{"lines":[{"words":[{"value":"Translation", "zoom":1}]}, {"words":[{"value":"english", "next_value":"french", "police":0, "code":"CAAIIAII", "zoom":2}]}, {"words":[{"value":" "}]}]}]}', + ]; + + +scriptLoaded('res/story/stories.js'); diff --git a/res/sound/cut.ogg b/res/sound/cut.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/cut_old.ogg b/res/sound/cut_old.ogg deleted file mode 100755 index e062899..0000000 Binary files a/res/sound/cut_old.ogg and /dev/null differ diff --git a/res/sound/rub1.ogg b/res/sound/rub1.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/rub1_old.ogg b/res/sound/rub1_old.ogg deleted file mode 100755 index ccd50ce..0000000 Binary files a/res/sound/rub1_old.ogg and /dev/null differ diff --git a/res/sound/rub2.ogg b/res/sound/rub2.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/rub2_old.ogg b/res/sound/rub2_old.ogg deleted file mode 100755 index 5d71917..0000000 Binary files a/res/sound/rub2_old.ogg and /dev/null differ diff --git a/res/sound/tap.ogg b/res/sound/tap.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/tap_old.ogg b/res/sound/tap_old.ogg deleted file mode 100755 index 144d2b3..0000000 Binary files a/res/sound/tap_old.ogg and /dev/null differ diff --git a/res/sound/tear.ogg b/res/sound/tear.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/tear1.ogg b/res/sound/tear1.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/tear1_old.ogg b/res/sound/tear1_old.ogg deleted file mode 100755 index 53023cb..0000000 Binary files a/res/sound/tear1_old.ogg and /dev/null differ diff --git a/res/sound/tear2.ogg b/res/sound/tear2.ogg deleted file mode 100755 index e69de29..0000000 diff --git a/res/sound/tear2_old.ogg b/res/sound/tear2_old.ogg deleted file mode 100755 index 82bfaf1..0000000 Binary files a/res/sound/tear2_old.ogg and /dev/null differ diff --git a/res/sound/tear_old.ogg b/res/sound/tear_old.ogg deleted file mode 100755 index 0d3bd7b..0000000 Binary files a/res/sound/tear_old.ogg and /dev/null differ diff --git a/src/lib_separation/event/event.js b/src/lib_separation/event/event.js index 1d9c2cb..2adc2bf 100755 --- a/src/lib_separation/event/event.js +++ b/src/lib_separation/event/event.js @@ -1,111 +1,108 @@ /* Namespace Event */ -var Event = Event || {}; -(function () { - "use strict"; - - var old_touch_move = {x:-1, y:-1}; - Event.events = { - tap : (appOnDevice_real() ? 'click' : 'click'), - touchmove : (appOnDevice_real() ? 'touchmove' : 'mousemove'), - touchend : (appOnDevice_real() ? 'touchend' : 'mouseleave'), - dbltap : (appOnDevice_real() ? 'dblclick' : 'dblclick'), - }; - - Event.getMousePos = function(event) { - // event de createJS 'click' - return { x: event.stageX, y: event.stageY }; - }; - - Event.getMousePosMove = function(event) { - // event classique HTML - if(!appOnDevice_real()) { - return { x: event.clientX, y: event.clientY }; - } - else { - return { - x: event.touches[0].clientX, - y: event.touches[0].clientY - }; - } - }; - - Event.getTouchPos = function(event) { - return Event.getMousePos(event); - }; - - Event.getTouchMove = function(event) { - var new_touch_move = Event.getMousePosMove(event); - - if(old_touch_move.x == -1 && old_touch_move.y == -1) - old_touch_move = new_touch_move; - - var coords = { - x1: old_touch_move.x, - y1: old_touch_move.y, - x2: new_touch_move.x, - y2: new_touch_move.y, +var Event = {}; + +var old_touch_move = {x:-1, y:-1}; +Event.events = { + tap : (appOnDevice_real() ? 'click' : 'click'), + touchmove : (appOnDevice_real() ? 'touchmove' : 'mousemove'), + touchend : (appOnDevice_real() ? 'touchend' : 'mouseleave'), + dbltap : (appOnDevice_real() ? 'dblclick' : 'dblclick'), +}; + +Event.getMousePos = function(event) { + // event de createJS 'click' + return { x: event.stageX, y: event.stageY }; +}; + +Event.getMousePosMove = function(event) { + // event classique HTML + if(!appOnDevice_real()) { + return { x: event.clientX, y: event.clientY }; + } + else { + return { + x: event.touches[0].clientX, + y: event.touches[0].clientY }; - old_touch_move = new_touch_move; - - return coords; - }; + } +}; - Event.invertTouchmoveXY = function(coords) { - var temp1 = coords.x1, temp2 = coords.x2; +Event.getTouchPos = function(event) { + return Event.getMousePos(event); +}; - coords.x1 = coords.y1; - coords.x2 = coords.y2; - coords.y1 = temp1; - coords.y2 = temp2; - - return coords; - }; - - Event.touchmove = function(event) { - event.preventDefault(); - var coords = Event.getTouchMove(event); +Event.getTouchMove = function(event) { + var new_touch_move = Event.getMousePosMove(event); - Event.cut(coords); - Event.erase(coords); - Event.open(Event.invertTouchmoveXY(coords)); - }; + if(old_touch_move.x == -1 && old_touch_move.y == -1) + old_touch_move = new_touch_move; - Event.touchend = function(event) { - old_touch_move = {x:-1, y:-1}; - Event.touchMoveAbortAll(Event.cut_obj); - Event.touchMoveAbortAll(Event.erase_obj); - Event.touchMoveAbortAll(Event.open_obj); + var coords = { + x1: old_touch_move.x, + y1: old_touch_move.y, + x2: new_touch_move.x, + y2: new_touch_move.y, }; - - Event.destroy = function(id, type) { - if(type !== undefined) { - switch(type) { - case 'tap' : Event.destroyTap(id); break; - case 'dbltap' : Event.destroyDbltap(id); break; - case 'cut' : Event.destroyCut(id); break; - case 'erase' : Event.destroyErase(id); break; - case 'open' : Event.destroyOpen(id); break; - default: alert('"' + type + '" inconnu dans Event.destroy()'); - } - } - else { - Event.destroyTap(id); - Event.destroyDbltap(id); - Event.destroyCut(id); - Event.destroyErase(id); - Event.destroyOpen(id); + old_touch_move = new_touch_move; + + return coords; +}; + +Event.invertTouchmoveXY = function(coords) { + var temp1 = coords.x1, temp2 = coords.x2; + + coords.x1 = coords.y1; + coords.x2 = coords.y2; + coords.y1 = temp1; + coords.y2 = temp2; + + return coords; +}; + +Event.touchmove = function(event) { + event.preventDefault(); + var coords = Event.getTouchMove(event); + + Event.cut(coords); + Event.erase(coords); + Event.open(Event.invertTouchmoveXY(coords)); +}; + +Event.touchend = function(event) { + old_touch_move = {x:-1, y:-1}; + Event.touchMoveAbortAll(Event.cut_obj); + Event.touchMoveAbortAll(Event.erase_obj); + Event.touchMoveAbortAll(Event.open_obj); +}; + +Event.destroy = function(id, type) { + if(type !== undefined) { + switch(type) { + case 'tap' : Event.destroyTap(id); break; + case 'dbltap' : Event.destroyDbltap(id); break; + case 'cut' : Event.destroyCut(id); break; + case 'erase' : Event.destroyErase(id); break; + case 'open' : Event.destroyOpen(id); break; + default: alert('"' + type + '" inconnu dans Event.destroy()'); } - }; - - Event.destroyAll = function() { - Destroy.list(Event.tap_obj); - Destroy.list(Event.dbltap_obj); - Destroy.list(Event.cut_obj); - Destroy.list(Event.erase_obj); - Destroy.list(Event.open_obj); - }; -})(); + } + else { + Event.destroyTap(id); + Event.destroyDbltap(id); + Event.destroyCut(id); + Event.destroyErase(id); + Event.destroyOpen(id); + } +}; + +Event.destroyAll = function() { + Destroy.list(Event.tap_obj); + Destroy.list(Event.dbltap_obj); + Destroy.list(Event.cut_obj); + Destroy.list(Event.erase_obj); + Destroy.list(Event.open_obj); +}; scriptLoaded('scripts/libs/separation_toolkit/event/event.js'); \ No newline at end of file diff --git a/src/lib_separation/word/word.js b/src/lib_separation/word/word.js index fe236f4..418d306 100755 --- a/src/lib_separation/word/word.js +++ b/src/lib_separation/word/word.js @@ -49,15 +49,16 @@ function Word(value, next_value, police, code, autoAddGesture) { } Word.prototype.done = function(fct_done) { - if(this.list_done[fct_done] !== undefined) + if(this.list_done[fct_done] !== undefined) { this.list_done[fct_done](); + } }; Word.prototype.generate = function() { var new_code, new_value, new_next_value; - if(!this.font) { + if(!!this.font) { this.destroy(); } @@ -126,9 +127,6 @@ Word.prototype.displayGUI = function() { Word.prototype.destroy = function() { this.destroyTimeouts(); - - - Event.destroy(this.getId()); for(var i = 0; i < this.tween.length; i++) { this.tween[i].pause();