仅拖动图像的一部分

时间:2019-02-19 13:52:18

标签: javascript

我们无法将上载的图像拖到第一个蒙版图像的右侧。...因为它与第二个图像的左侧重叠。...

这是codepen:https://codepen.io/kidsdial/pen/JxxQRv

Here is video link

enter image description here

$(document).ready(function () {
            // dont have a webserver so im using base64string instead
              var maskedImageUrla ="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAAEWCAYAAABiyvLjAAAACXBIWXMAAC4jAAAuIwF4pT92AAAF+mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTAxLTE5VDE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7IDlGwUOB94BpaPNCOvASnD/wUGs0OU5CbirJ4N2UGkunMKTlVbSjvLZzNxT8+1yTmkxnAKTlXbOztAwcaIHav/I5aPNC+OgFS1ldkBCnQHMep5MDuI1ESOgFS1A7MDFGAr8EbghVg+Ut8sIFVtJc3eeuaLxBY6V2YHkZrOVXCq2h+APbND9OE+Ygud+5NzSK3hCEhV2pvmlc8mYrrtcCwfqVAuQlCVXpQdYB62Ah8ELsW926RSWECq0ouzA/RgCLiA2DR0ODeK1G5eA1KVfg88JTvEDEaAzwKfxCOxpUo4AlJV9qOe5TNGHAp3AbGbgaSKWECqymHZAabxbeKMnoeTc0idZAGpKnUa/dwAnIs3kUqpLCBVZUl2AOIY7HOAe7KDSLKAVJ0tic+9higez+aRasQbUVWVjOmuDcCpwLOxfKTacRm2qrIYeGz8z7I9CpwHXI43kUq15QhIVRmm/A08twPvB54GXIblI9WaIyBVaV/gVxR/7XGYOBTuQmBHwY8tqSSOgFSl9cCHC3y8UWLLnKcC52P5SI3iCEgZrgFevcDHuIwos40LjyMpgyMgZTiV2GW6H1cDzyTO5rF8pAazgJRhDHgnUUQP9/g1twKHjn/NunJiSaqSU3DKtgg4GXgNcDSxZc8iYmHBQ0TxfIu4mVRSi/x/pI20G7Wjx7YAAAAASUVORK5CYII=";
          
          // maskedImage one
            var mask1 = $(".container").mask({
                maskImageUrl: maskedImageUrla,maskedImageUrlb,
                imageUrl: "",
                onImageCreate: function(img){
                // add your style to the img example below
                  //img.css({"background": "red" })
                },
                onMaskImageCreate: function(img){
                // add your style to the img example below
                  
				  img.css({ "position" : "relative",
"left":105, "top":105	  })
                }
            });
            // maskedImage two
            var mask2 = $(".container").mask({
                maskImageUrl: maskedImageUrlb
            });



fileupa1.onchange= function(){
  mask1.loadImage(URL.createObjectURL(fileupa1.files[0]));
};

fileupa2.onchange= function(){
  mask2.loadImage(URL.createObjectURL(fileupa2.files[0]));
};

}); // end of document ready

// jq plugin for mask
(function ($) {

    $.fn.mask = function (options) {
        // This is the easiest way to have default options.
        var settings = $.extend({
            // These are the defaults.
            maskImageUrl: undefined,
            imageUrl: undefined,
            scale: 1, 
            onImageCreate: function(img){ },
            onMaskImageCreate: function(div) {},
        }, options);


        var container = $(this);
        let prevX = 0,
            prevY = 0,
            translateX = 0,
            translateY = 0,
            draggable = false,
            img, 
            canvas, 
            context, 
            image,
            div;
            

        container.onDragStart = function (evt) {
            var x = evt.offsetX + (translateX);
            var y = evt.offsetY + (translateY);
            var pixelData = context.getImageData(x, y, 1, 1).data;
            draggable = pixelData[0] > 1; // allow to drag
            // reset all images that exist in the current page and set it to inactive
            $(".masked-img .mask-draggable-image").attr("active", "false"); 
            img.attr("active", "true");
            prevX = evt.clientX;
            prevY = evt.clientY;
        };

        container.getImagePosition = function () {
            return { x: translateX, y: translateY };
        };

        container.onDragOver = function (evt) {
            if (draggable && img.attr("active") == "true") {
                translateX += evt.clientX - prevX;
                translateY += evt.clientY - prevY;
                prevX = evt.clientX;
                prevY = evt.clientY;
                container.updateStyle();
            }
        };

        container.updateStyle = function () {
            let transform = "translate(" + translateX + "px, " + translateY + "px) scale(" + settings.scale + ")";
            img[0].style.transform = transform;
        };
      
       // change the draggable image
        container.loadImage = function (imageUrl) {
            if (img)
                img.remove();
            // reset the code.
            translateX = translateY = prevX =prevY= 0;
            settings.imageUrl = imageUrl;
            img = $("<img draggable='true'  src='" + imageUrl + "' />").addClass("mask-draggable-image");
            div.prepend(img);
            if (settings.onImageCreate)
                settings.onImageCreate(img);
        };

        // change the masked Image
        container.loadMaskImage = function (imageUrl) {
            if (div)
                div.remove();
            canvas = document.createElement("canvas");
            context = canvas.getContext('2d');
            settings.maskImageUrl = imageUrl;
            div = $("<div/>", {
                style: "-webkit-mask-image:url(" + settings.maskImageUrl + ");  mask-image: url(" + settings.maskImageUrl + ");",
                "class": "masked-img"
            }).append(canvas);
            div.bind("dragover", container.onDragOver);
            div.bind("dragstart", container.onDragStart);
            image = new Image();
            image.setAttribute('crossOrigin', 'anonymous');
            image.src = settings.maskImageUrl;
            
            image.onload = function () {
                canvas.width = image.width;
                canvas.height = image.height;
                context.drawImage(image, 0, 0, image.width, image.height);
                div.css({ "width": image.width, "height": image.height });
            };
            container.append(div);
            if (settings.onMaskImageCreate)
                settings.onMaskImageCreate(div);
            container.loadImage(settings.imageUrl);
        };
        container.loadMaskImage(settings.maskImageUrl);
        return container;
    };
}(jQuery));   
.container {
    border: 1px solid #DDDDDD;
    display: flex;
    position: relative;
    background: gold;
}

container canvas {
    display: block;
    position: absolute;
    top: 0;
    z-index: -1;
}

.masked-img {
    -webkit-mask-position: center center;
    mask-position: center center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: white;
    overflow: hidden;
    margin-left:10px;
}
<script src= "https://code.jquery.com/jquery-3.3.1.min.js">
</script>

image 1 
<input id="fileupa1"  type="file" >

image 2 
<input FILEDIA="1" id="fileupa2"  type="file" >
<div class="container">

</div>

如果您需要其他任何信息,请告诉我。...

请帮助我找到解决方法。...

预先感谢。...

1 个答案:

答案 0 :(得分:2)

我已经重新创建了插件,现在它仅使用画布遮罩,这里不再涉及css mask

$(document).ready(function() {
    var maskedImageUrla = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQMAAAEWCAMAAABVFALRAAAAaVBMVEVHcEz////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////dvhWBAAAAInRSTlMABWcZ/QmP9IX67TovokSZ5d0hD65eudRVbnvATScSx89zp18fZAAABsRJREFUGBnlwAeCo0gWBNAAEhLvjbyJ+x9yd6a7p8vIAEIq5c+Hd+FGkQOreT3JPWyWxCS5g8U2/NcZ1jr0/CWDreqSvw2wVBrzj8iBlXLNv1LYaKX4wRoW6viRymAfl59VsI7Lrw6wTMdvVrBLoviVKmCVOuZ3A2ziD7zEg0VaXtTBHhtelsEaOa8oYYta85o97OCceNUadgh53RZWSHiDOsACfsVbXFgg4E095Et4W9RAOr/iHR2kC3lPC+G8iPdoH7IFvG8F0byI97UQLeA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////////////////////////////////////////////////////////////////////////////////////////////////////////////////+EHRzTAAAAHnRSTlMAS6Ph+PEC/BEI6SQaLY0/ethWzsQ0uoSXZ6xws1/MHbQyAAALUElEQVQYGe3AB2KjSBQE0AKaDuQgUK77H3PXE+2xZSVCg/6DuMTmwX4bbuooiRV/UiqO2v4QbvdBbiFmovNmG9aKPxleEG92+9JCTCo771rDOyT9tskgpuDKouZDovCcQYwqPfaKz6i3HcQ4XFBEHEBSlBBD02UYczDRNoUYULqNOLDN2UEMwjU9x6B2KcTTul3M0fSBhniC29ccV3S0EA9y+4TjU0UG8QB9jjgNU1iIewU1p6MqB3GPcsNpxXsNcav8xOnVJcRN0pDzOKUQ12hbGM7FVA7iW65SnFNUQlzmjjHnZbhzEBekLT2QlBBf2iv6odAQn9gTvdGmEB/pMqFHVAPxni5o6JXCQfyRtvTOxkL80sT0UJJjWq47F4fTIQx3RbE97s9BmadWY3auoJ9UgIm47lycEn5JtUWTYUZZS2/tMbosqA4Jr0nCY6cxj5geKzRGpIMw4c3UZhtkmNrRGPrs4DCWrEp4tyg8p5iOC+k5s7EYgw5OfFRUZZiG3dB/rcXg7DHiUzZnh/GlNZegthhWFxo+Te06jCyPuQy1xXB0s+FA6qPFmGIuRW0xEN3UHJAJS4wlUIaL0ToMIq85tHrvMIbAcEl6h+fpynAEqsgwuMBwWU4aT9LZhmMJcwwrMFyaEE9qYo7okGJAgeHyFHiGPXBkO4uhBIZLtMfjyoSji88YRmC4TCUe5AoaTqAtMYDAcKFUiofkNacSZnhWYLhYtcP9dKM4HbN1eEpguGAh7nfktKIAT0gVF22Pe205uUOGR9mIy2Y63KfiDNQZj9E9ly6xuMee8+gzPKLg8h1wh4ZziRvc78w12ONmpeF8Qod7Ga6BSXGrmHOqU9wlSwxXodW4SZYYzkoFuINruRYVbmFrzm6rcbOQq2FyXOc29EBvcaMjV6TVuOpALyQdblIarske12zpCXPEDbKEq6IyfC+gP0KHa/SGKxPiWzahR+oUV1RcnRLf2dErcYdvZYq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UQv+zon4OD+M0mhp4pNMRfAT1zhPhgR5+oAOIjG9MfcQfxr4beiFKIz3p6YmMhvpAaeuHgIL5U0AcFxAUu4fz2EJfoM+emAojLdM15xR3Ed0rOKsogvtdzRhsLcUXH+YQO4qoT51JB3CDnPFQAcZMD5xClELfpOIPeQtyq5+S2GuJWuuTEVANxj5qTSnKIu+w5pd5C3MfFnE6hIe6141TMGeJ+HSeSdBCPqDmJTQbxkCOnsHMQj0k5PrOHeFjLsSUdxOMqjmxjIZ6Qc1xbDfEMHXNEcQnxpAPH02cQz9pzLKaCeF7HkSQdxAC04ShOFmIQLUdgjhADCTm8pIMYypGDO1mIwQQcmNlDDCjlsKIcYkiOgyocxLBiDifqIIZWczCFgxjchgPZ5BAjOBgOIT5DjMNwADsLMY7Q8GltBzGWHZ+l9hpiNDs+KcwgRhQaPqMuIcZl+Dh11BDjOhk+7JBBQ4xrw0dFAcT4Ij7GVA5iAooP6VOIKVg+IgkgppHzfqZwEBNpeLdNDjEVveWd4gZiQifDu+wsxJQS3qPNISaV8g5RoyGmdebN4r2GmFrIG6nKQUwv4U3U1kLMIOUtzC6DmINueIMwhZjJkVedcoi56IpXbDqIGe35rTYANMRsdMlvRA3EzJziJclZQ8wu5Nfio4PwQGr4BbV1EH6o+IkpLIQ3DvxHmEFDeEPv+N4hhfBME/G3voPwj27CyFC1RY6X9B+l783jEhxnoQAAAABJRU5ErkJggg==";

    // maskedImage one
    var mask1 = $(".container").mask({
        maskImageUrl: maskedImageUrla,
        onMaskImageCreate: function(img) {
            // add your style to the img example below
            img.css({
                "left": 105,
                "top": 105
            })
        }
    });
    // maskedImage two
    var mask2 = $(".container").mask({
        maskImageUrl: maskedImageUrlb,
    });

    fileupa1.onchange = function() {
        mask1.loadImage(URL.createObjectURL(fileupa1.files[0]));
    };

    fileupa2.onchange = function() {
        mask2.loadImage(URL.createObjectURL(fileupa2.files[0]));
    };

}); // end of document ready

// jq plugin for mask
(function($) {
    var JQmasks = [];
    $.fn.mask = function(options) {
        // This is the easiest way to have default options.
        var settings = $.extend({
            // These are the defaults.
            maskImageUrl: undefined,
            imageUrl: undefined,
            scale: 1,
            id: new Date().getUTCMilliseconds().toString(),
            x: 0, // image start position
            y: 0, // image start position
            onMaskImageCreate: function(div) {},
        }, options);


        var container = $(this);

        let prevX = 0,
            prevY = 0,
            draggable = false,
            img,
            canvas,
            context,
            image,
            timeout,
            initImage = false,
            startX = settings.x,
            startY = settings.y,
            div;

        container.mousePosition = function(event) {
            return {
                x: event.pageX || event.offsetX,
                y: event.pageY || event.offsetY
            };
        };

        container.selected = function(ev) {
            var pos = container.mousePosition(ev);
            var item = $(".masked-img canvas").filter(function() {
                var offset = $(this).offset()
                var x = pos.x - offset.left;
                var y = pos.y - offset.top;
                var d = this.getContext('2d').getImageData(x, y, 1, 1).data;
                return d[0] > 0;
            });

            JQmasks.forEach(function(el) {
                var id = item.length > 0 ? $(item).attr("id") : "";
                if (el.id === id)
                    el.item.enable();
                else el.item.disable();
            });
        };

        container.enable = function() {
            draggable = true;
            $(canvas).attr("active", "true");
            div.css({
                "z-index": 2
            });
        };

        container.disable = function() {
            draggable = false;
            $(canvas).attr("active", "false");
            div.css({
                "z-index": 1
            });
        };

        container.onDragStart = function(evt) {
            container.selected(evt);
            prevX = evt.clientX;
            prevY = evt.clientY;
        };

        container.getImagePosition = function() {
            return {
                x: settings.x,
                y: settings.y,
                scale: settings.scale
            };
        };

        container.onDragOver = function(evt) {
            if (draggable && $(canvas).attr("active") === "true") {
                var x = settings.x + evt.clientX - prevX;
                var y = settings.y + evt.clientY - prevY;
                if (x === settings.x && y === settings.y)
                    return; // position has not changed
                settings.x += evt.clientX - prevX;
                settings.y += evt.clientY - prevY;
                prevX = evt.clientX;
                prevY = evt.clientY;
                container.updateStyle();
            }
        };

        container.updateStyle = function() {
            clearTimeout(timeout);
            timeout = setTimeout(function() {
                context.clearRect(0, 0, canvas.width, canvas.height);
                context.beginPath();
                context.globalCompositeOperation = "source-over";
                image = new Image();
                image.setAttribute('crossOrigin', 'anonymous');
                image.src = settings.maskImageUrl;
                image.onload = function() {
                    canvas.width = image.width;
                    canvas.height = image.height;
                    context.drawImage(image, 0, 0, image.width, image.height);
                    div.css({
                        "width": image.width,
                        "height": image.height
                    });
                };

                img = new Image();
                img.src = settings.imageUrl;
                img.setAttribute('crossOrigin', 'anonymous');
                img.onload = function() {
                    settings.x = settings.x === 0 && initImage ? (canvas.width - (img.width * settings.scale)) / 2 : settings.x;
                    settings.y = settings.y === 0 && initImage ? (canvas.height - (img.height * settings.scale)) / 2 : settings.y;
                    context.globalCompositeOperation = 'source-atop';
                    context.drawImage(img, settings.x, settings.y, img.width * settings.scale, img.height * settings.scale);
                    initImage = false;
                };
            }, 0);
        };

        // change the draggable image
        container.loadImage = function(imageUrl) {
            if (img)
                img.remove();
            // reset the code.
            settings.y = startY;
            settings.x = startX;
            prevX = prevY = 0;
            settings.imageUrl = imageUrl;
            initImage = true;
            container.updateStyle();
        };

        // change the masked Image
        container.loadMaskImage = function(imageUrl, from) {
            if (div)
                div.remove();
            canvas = document.createElement("canvas");
            context = canvas.getContext('2d');
            canvas.setAttribute("draggable", "true");
            canvas.setAttribute("id", settings.id);
            settings.maskImageUrl = imageUrl;
            div = $("<div/>", {
                "class": "masked-img"
            }).append(canvas);

            div.find("canvas").on('touchstart mousedown', function(event) {
                if (event.handled === false) return;
                event.handled = true;
                container.onDragStart(event);
            });

            div.find("canvas").on('touchend mouseup', function(event) {
                if (event.handled === false) return;
                event.handled = true;
                container.selected(event);
            });

            div.find("canvas").bind("dragover", container.onDragOver);
            container.append(div);
            if (settings.onMaskImageCreate)
                settings.onMaskImageCreate(div);
            container.loadImage(settings.imageUrl);
        };
        container.loadMaskImage(settings.maskImageUrl);
        JQmasks.push({
            item: container,
            id: settings.id
        });
        return container;
    };
}(jQuery));
.container {
    border: 1px solid #DDDDDD;
    display: flex;
    background: red;
}

.container canvas {
    display: block;
}

.masked-img {
    overflow: hidden;
    margin-left: 10px;
    position: relative;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
image 1 
<input id="fileupa1"  type="file" >

image 2 
<input FILEDIA="1" id="fileupa2"  type="file" >
<div class="container">

</div>

CodePen