javascript - How to resize window dynamically using angularjs -


well, i've been searching around how resize window cursor, didn't had succeed.

my idea resize window inside of html page , able move around. guess need css experience so.

could me? thanks!

for description guess you're trying resize div or can use transitions:

https://css-tricks.com/snippets/css/scale-on-hover-with-webkit-transition/

try using drag , drop:

http://ngmodules.org/modules/ngdraggable (example)

to use draggable use directive follows:

1) include library in index:

<script src="ngdraggable.js"></script> 

2) in module definition inject ngdraggable:

angular.module('myapp', ['... , ngdraggable']); 

3) append html tags ng-drag

<div ng-drag="true" ng-drag-data="{obj}" ng-center-anchor="true"     ng-drag-success="ondragcomplete($data,$event)">   draggable div </div> 

where ng-drag-success function when drag finished.

so, can make box based on div's in html, , append "resize points" @ corners draggable items , on success callback (ondragcomplete) modify style of "window" change size.

to accomplish resize, can make use of ng-style , change width , height of "window".

html:

<!-- resizable window --> <div ng-style="changingstyle"> 

controller:

$scope.changingstyle = {} $scope.ondragcomplete = function(data, event){    ...    // here pass params change size want    changewinsize(someoperationtoresize);    ... }  var changewinsize = function (params){      $scope.changingstyle = {height: params.height, width: params.width } } 

please provide further information problem.


Comments

Popular posts from this blog

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -