Index: lams_central/web/images/authoring_bin.svg
===================================================================
diff -u
--- lams_central/web/images/authoring_bin.svg (revision 0)
+++ lams_central/web/images/authoring_bin.svg (revision 55adc14ea7cb3437b01a7e13d66f248b26e55adc)
@@ -0,0 +1,158 @@
+
+
+
\ No newline at end of file
Index: lams_central/web/includes/javascript/authoring/authoringGeneral.js
===================================================================
diff -u -rd3a385feec7bc1de8bb274dd23d7e99c4e431e92 -r55adc14ea7cb3437b01a7e13d66f248b26e55adc
--- lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision d3a385feec7bc1de8bb274dd23d7e99c4e431e92)
+++ lams_central/web/includes/javascript/authoring/authoringGeneral.js (.../authoringGeneral.js) (revision 55adc14ea7cb3437b01a7e13d66f248b26e55adc)
@@ -45,7 +45,9 @@
// list of all dialogs, so they can be easily closed all at once
'dialogs' : [],
// stores precached tool images so they can be used in exported SVG
- 'iconLib' : {},
+ 'iconLib' : {
+ 'bin' : 'images/authoring_bin.svg'
+ },
// icons for special activities
'toolMetadata': {
'gate' : {
@@ -82,7 +84,11 @@
'groupingEffectPadding' : 5,
'selectEffectPadding' : 7,
- 'supportsDownloadAttribute' : typeof $('')[0].download != 'undefined'
+ 'supportsDownloadAttribute' : typeof $('')[0].download != 'undefined',
+
+ // when mouse hovers over rubbish bin
+ 'binGlowWidth' : 10,
+ 'binGlowOpacity' : 1
},
'colors' : {
@@ -95,8 +101,10 @@
'annotationPalette' : ['FFFF00', '00FFFF', '8A2BE2', '7FFF00', '6495ED',
'FFF8DC', 'FF8C00', '00BFFF', 'DCDCDC', 'ADD8E6', '20B2AA',
'B0C4DE', 'FFE4E1', 'FF4500', 'EE82EE'],
- // when mouse hover rubbish bin
- 'binActive' : 'red',
+
+ // when mouse hovers over rubbish bin
+ 'binGlow' : 'red',
+
'branchingEdgeStart' : 'green',
'branchingEdgeEnd' : 'red',
// highlight branching edges on mouse hover
@@ -1998,7 +2006,7 @@
}
// draw rubbish bin on canvas
- layout.bin = paper.path(Raphael.format('M {0} {1} h -50 l 10 50 h 30 z', width - 5, height - 50));
+ layout.bin = paper.image(LAMS_URL + layout.iconLib.bin, width - 55, height - 55, 48, 48);
// so it can be found when SVG code gets cloned
$(layout.bin.node).attr('id', 'rubbishBin');
Index: lams_central/web/includes/javascript/authoring/authoringHandler.js
===================================================================
diff -u -rc2f6c907d73c772bcdef6df7d5c86e1495df83ac -r55adc14ea7cb3437b01a7e13d66f248b26e55adc
--- lams_central/web/includes/javascript/authoring/authoringHandler.js (.../authoringHandler.js) (revision c2f6c907d73c772bcdef6df7d5c86e1495df83ac)
+++ lams_central/web/includes/javascript/authoring/authoringHandler.js (.../authoringHandler.js) (revision 55adc14ea7cb3437b01a7e13d66f248b26e55adc)
@@ -80,7 +80,10 @@
items.isDragged = false;
items.unmouseup();
HandlerLib.resetCanvasMode(true);
- layout.bin.attr('fill', 'transparent');
+ if (layout.bin.glowEffect) {
+ layout.bin.glowEffect.remove();
+ layout.bin.glowEffect = null;
+ }
// do whetver needs to be done with the dragged elements
mouseupHandler(mouseupEvent);
@@ -113,9 +116,17 @@
// highlight rubbish bin if dragged elements are over it
if (HandlerLib.isElemenentBinned(event)) {
- layout.bin.attr('fill', layout.colors.binActive);
- } else {
- layout.bin.attr('fill', 'transparent');
+ if (!layout.bin.glowEffect) {
+ layout.bin.glowEffect = layout.bin.glow({
+ 'width' : layout.conf.binGlowWidth,
+ 'opacity' : layout.conf.binGlowOpacity,
+ 'color' : layout.colors.binGlow,
+ 'offsety' : 2
+ });
+ }
+ } else if (layout.bin.glowEffect){
+ layout.bin.glowEffect.remove();
+ layout.bin.glowEffect = null;
}
},