FUXA icon indicating copy to clipboard operation
FUXA copied to clipboard

Scalling problem in shapes and controllers

Open patsonkaushik opened this issue 3 years ago • 8 comments

I want to scale in component and shape but it's not working with given svg .. can you guide me how to solve this issue???

patsonkaushik avatar Dec 24 '21 10:12 patsonkaushik

Hi, I do not understand what you mean. can you give me an example?

unocelli avatar Dec 24 '21 12:12 unocelli

I am going to do like this video in fuxa editor but getting errors. please find attachment video .. https://user-images.githubusercontent.com/77775964/147378331-96510b51-4845-48dc-9af2-ecf5d4285fb2.mp4

patsonkaushik avatar Dec 25 '21 05:12 patsonkaushik

Currently you can hide and show a shape, if you will implement the scale effect and you will that I try to help you, you have to share your code

unocelli avatar Dec 26 '21 11:12 unocelli

I have made like this: => when user select "scale " option , he will get 2 sub option how to scale selected object. it has 2 option 1) first screenshot is scaling is by height or width or both 2) 2nd screenshot is about when user select a) top-left it will zoom out from top left likewise next options... scale-1 scale-2 FUXA-master3.zip

Also consider this video .. https://user-images.githubusercontent.com/77775964/147378331-96510b51-4845-48dc-9af2-ecf5d4285fb2.mp4

patsonkaushik avatar Dec 27 '21 04:12 patsonkaushik

Hi, you don't have to check the selection of optionsScale. you have to remove from flex-action.component.html file the (selectionChange)="onCheckActionScaleType(item.type, item)" The error occurs because you don't have defined the onCheckActionScaleType function

unocelli avatar Jan 02 '22 13:01 unocelli

you must also implement the scale effect in 'processAction' by shapes.component.ts

unocelli avatar Jan 02 '22 13:01 unocelli

I have defined onActioscaletype function now errors is gone but i am going to implement scale effects .. how to implement it with SVG components... find attachment . i have uploaded latest code here.. FUXA-master4.zip

patsonkaushik avatar Jan 03 '22 06:01 patsonkaushik

You have to look by svg library and manage the options consequently in 'processAction' by shapes.component.ts

static processAction(act: GaugeAction, svgele: any, value: any,  gaugeStatus: GaugeStatus) {
   ...
         } else if (this.actionsType[act.type] === this.actionsType.scale) {
            if (act.range.min <= value && act.range.max >= value) {
                let element = SVG.adopt(svgele.node);
                element.scale(2);    //, 0, 0);
            }
        }
    }

shapes.component.zip

unocelli avatar Jan 03 '22 07:01 unocelli