From c208f46c31ac70f2d6cde7665db516490c144bc6 Mon Sep 17 00:00:00 2001 From: machuanjia Date: Tue, 12 Jan 2016 15:17:53 +0800 Subject: [PATCH] add 21 --- bower.json | 2 +- package.json | 2 +- src/js/editor.js | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 4a8b2fb..409158f 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-wt-editor", - "version": "1.0.20", + "version": "1.0.21", "homepage": "https://github.com/WorktileTech/angular-wt-editor", "authors": [ "YCTech" diff --git a/package.json b/package.json index 3f417af..e890ecd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-wt-editor", - "version": "1.0.20", + "version": "1.0.21", "description": "angular-wt-editor =================", "main": "index.js", "scripts": { diff --git a/src/js/editor.js b/src/js/editor.js index 32c3507..e6120ab 100644 --- a/src/js/editor.js +++ b/src/js/editor.js @@ -950,6 +950,11 @@ angular.module("wt-editor") }); }); + $(window).on('resize', _.throttle(function () { + $timeout(function () { + vm.editorHeight.height = ($(element).find('.wt-editor-container-code').height())+'px'; + }, 50); + }, 150)); $timeout(function(){ vm.editorHeight.height = ($(element).find('.wt-editor-container-code').height())+'px'; },128);