久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

jquery resizable插件,根據拖動邊設置minWidth

Jquery resizable plugin, set minWidth depending on the dragging edge(jquery resizable插件,根據拖動邊設置minWidth)
本文介紹了jquery resizable插件,根據拖動邊設置minWidth的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

所以我有一個圖像,它周圍是一個裁剪標記,我不希望能夠將裁剪標記調整為小于圖像的大小.

為此,我需要設置裁剪標記的 minWidth,這取決于用戶從哪一側調整大小(到處都有一個句柄:n、ne、e、se 等)

我的問題是:如何做到這一點?(我附上了一張圖片讓我的問題更清楚)

另外,這里有一個 :有點奇怪的交互,但在這里(jsfiddle)

$(function() {$( "#resizable" ).resizable({句柄:'e,n,s,w',調整大小:函數(事件,用戶界面){switch($(this).data('resizable').axis){案例n":$(this).resizable("option", "minHeight", 75);休息;案例's':$(this).resizable("option", "minHeight", 100);休息;案例e":$(this).resizable("option", "minWidth", 150);休息;案例w":$(this).resizable("option", "minWidth", 200);休息;}}});});

So I have an image, around it is a crop marker, I don't want to be able to resize the crop marker smaller than the image.

To do that I will need to set the minWidth of the crop marker which is depending on from which side the user is resizing (there is a handle everywhere: n, ne, e, se etc.)

My question is: how do achieve this? (I included an image to make my question a bit more clear)

Also, here is a jsfiddle that demonstrates the problem.

解決方案

It looks like you posted this question twice. Here is my answer from the other question: Kind of a weird interaction, but here it is (jsfiddle)

$(function() {
    $( "#resizable" ).resizable({
        handles : 'e, n, s, w',
        resize : function(event, ui){
            switch($(this).data('resizable').axis)
            {
                case 'n':
                    $(this).resizable( "option", "minHeight", 75 );
                    break;
                case 's':
                    $(this).resizable( "option", "minHeight", 100 );
                    break;
                case 'e':
                    $(this).resizable( "option", "minWidth", 150 );
                    break;
                case 'w':
                    $(this).resizable( "option", "minWidth", 200 );
                    break;
            }
        }
    });
});?

這篇關于jquery resizable插件,根據拖動邊設置minWidth的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

jQuery/JavaScript Library for avatar creation?(用于創建頭像的 jQuery/JavaScript 庫?)
How to do following mask input problem?(如何做以下掩碼輸入問題?)
Issues Setting Value/Label Using DropKick Javascript(使用 DropKick Javascript 設置值/標簽的問題)
how to unit-test private methods in jquery plugins?(如何對 jquery 插件中的私有方法進行單元測試?)
stellar.js - configuring offsets / aligning elements for a vertical scrolling website?(stellar.js - 為垂直滾動網站配置偏移量/對齊元素?)
jQuery masked input plugin. select all content when textbox receives focus(jQuery 屏蔽輸入插件.當文本框獲得焦點時選擇所有內容)
主站蜘蛛池模板: 亚洲国产成人一区二区 | 午夜影院在线视频 | 国产精品综合久久 | 国产精品亚洲精品日韩已方 | 日韩精品一二三区 | 中文字幕不卡 | 在线免费观看黄色网址 | 91手机精品视频 | 99国产精品99久久久久久 | 欧美黄色一区 | 黄色一级毛片 | 日韩91 | 日本成人午夜影院 | 欧美一区二区在线观看 | 在线免费中文字幕 | 亚洲福利精品 | 亚洲精品视频在线看 | 一区二区三区电影在线观看 | 国产精品精品视频 | 欧美网址在线观看 | 免费在线一区二区三区 | 国产成人小视频 | 羞羞的视频免费在线观看 | 国产成人综合网 | 欧美日韩亚洲国产综合 | 久久噜| 鲁一鲁资源影视 | 久久精品1 | 九一精品 | 欧美日韩一区精品 | 国产欧美日韩一区二区三区 | 国内精品一区二区三区 | 国产一区91精品张津瑜 | 自拍视频一区二区三区 | 国产欧美精品区一区二区三区 | 国产精品电影网 | 欧美一区永久视频免费观看 | 欧美三级视频 | 欧美亚洲国产一区 | 免费v片在线观看 | 颜色网站在线观看 |