rebootcode / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 0 forks source link

shape library click and select any shape try to use library again #880

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
click shape library and select a shape, than try to click again and select 
different shape

What is the expected output? What do you see instead?
when clicked shape library next time it should show all the shapes but instead 
it doesnt show

In what browser did you experience this problem? 
crome, firefox

In what version of SVG-edit does the problem occur? 
2.6 alpha

Original issue reported on code.google.com by baskar...@gmail.com on 17 Nov 2011 at 6:30

GoogleCodeExporter commented 9 years ago
When You clik again hold LMB and move then it shows...
Any idea how to fix this?
-MG 

Original comment by maciej.g...@gmail.com on 20 Jun 2012 at 7:57

GoogleCodeExporter commented 9 years ago
My solution:

in svg-editor.js:
// Clicking the "show" icon should set the current mode
shower.mousedown(function(evt) {
    if(shower.hasClass('disabled')) return false;
    var holder = $(hold_sel);
    var l = pos.left+34;
    var w = holder.width()*-1;
    var time = holder.data('shown_popop')?200:0;
+   if (evt.currentTarget.id === 'tools_shapelib_show'){
+       time = holder.data('shown_popop')?0:0;
+   }
    timer = setTimeout(function() {
        // Show corresponding menu
        if(!shower.data('isLibrary')) {
            holder.css('left', w).show().animate({
                left: l
            },150);
        } else {
            holder.css('left', l).show();
        }
        holder.data('shown_popop',true);
    },time);
    evt.preventDefault();
})

This was only about delay of popup:)
-MG

Original comment by maciej.g...@gmail.com on 9 Jul 2012 at 2:11