| 1133 | } |
| 1134 | |
| 1135 | var autoFixedHandle = function(){ |
| 1136 | var $window = $(window); |
| 1137 | var top = $window.scrollTop(); |
| 1138 | |
| 1139 | if (!settings.toolbarAutoFixed) |
| 1140 | { |
| 1141 | return false; |
| 1142 | } |
| 1143 | |
| 1144 | if (top - editor.offset().top > 10 && top < editor.height()) |
| 1145 | { |
| 1146 | toolbar.css({ |
| 1147 | position : "fixed", |
| 1148 | width : editor.width() + "px", |
| 1149 | left : ($window.width() - editor.width()) / 2 + "px" |
| 1150 | }); |
| 1151 | } |
| 1152 | else |
| 1153 | { |
| 1154 | toolbar.css({ |
| 1155 | position : "absolute", |
| 1156 | width : "100%", |
| 1157 | left : 0 |
| 1158 | }); |
| 1159 | } |
| 1160 | }; |
| 1161 | |
| 1162 | if (!state.fullscreen && !state.preview && settings.toolbar && settings.toolbarAutoFixed) |
| 1163 | { |